Filter löschen
Filter löschen

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

14 Ansichten (letzte 30 Tage)
I can't modify the page margins in this version of Matlab, while I could in Matlab R2010a.
What can I do?

Antworten (1)

Sharmila Raghu
Sharmila Raghu am 1 Jun. 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.

Kategorien

Mehr zu MATLAB Compiler finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by