Borrar filtros
Borrar filtros

How can I set the of margins of the page configuration in Matlab R2016a?

14 visualizaciones (últimos 30 días)
I can't modify the page margins in this version of Matlab, while I could in Matlab R2010a.
What can I do?

Respuestas (1)

Sharmila Raghu
Sharmila Raghu el 1 de Jun. de 2016
Hi Oscar,
I believe that you want to change the margins of the page configuration when you want to take a printout of your code from the Editor. The releases prior to MATLAB R2012a allows user to change the print margin via "File > Print > Page Setup". However, starting from MATLAB R2012a, this feature is no longer available.
There are two workarounds for this issue:
1. Physically tab all the code to create the indentation. This can be achieved quickly by pressing Ctrl+A in the Editor to select all the code and pressing TAB on the keyboard to indent the code.
2. Open and print the M-file in Wordpad. Wordpad has the functionality to adjust the margins of the code printout.
A simple self written MATLAB function is attached to ease the process of opening M-files using Wordpad. This function is called "openUsingWordpad.m".
function openUsingWordpad(filename)
%openUsingWordpad(FILENAME): This is a simple function to open M-files or textfiles
%using Wordpad for more printing options. FILENAME is a string representing
%the filename plus the extension of the file to be opened.
system(['start wordpad ' filename]);
end
For example, if you want to open a file "foo.m" in your working directory, simply include the above function "openUsingWordpad" in your working directory and execute the following command in the MATLAB Command Window:
>> openUsingWordpad('foo.m');
I work for MathWorks and I have forwarded this feedback to the appropriate product team.

Categorías

Más información sobre MATLAB Compiler en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by