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

조회 수: 34 (최근 30일)
OSCAR ZAMORA PICAZO
OSCAR ZAMORA PICAZO 2016년 5월 26일
답변: Sharmila Raghu 2016년 6월 1일
I can't modify the page margins in this version of Matlab, while I could in Matlab R2010a.
What can I do?

답변 (1개)

Sharmila Raghu
Sharmila Raghu 2016년 6월 1일
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.

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by