23.06.2015 Views

MATLAB Programming

MATLAB Programming

MATLAB Programming

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Function Arguments<br />

s.maxWidth = 200;<br />

s.maxHeight = 150;<br />

Now call the function, passing the filename and input structure:<br />

publish_ip('ipscript.m', s);<br />

The maximum height is 150.<br />

List of all arguments:<br />

format: 'xml'<br />

maxHeight: 150<br />

maxWidth: 200<br />

outputDir: 'C:/matlab/test'<br />

script: 'ipscript.m'<br />

To disable struct expansion, include the following statement somewhere in<br />

your program code before the p.parse statement:<br />

p.StructExpand = false;<br />

Overriding the Input Structure. If you want to pass your argument list<br />

in a structure, as described in the previous section, but you also want to<br />

alter the value of one or more of these arguments without having to modify<br />

the structure, you can do so by passing both the structure and the modified<br />

argument:<br />

publish_ip('ipscript.m', s, ...<br />

'outputDir', 'C:/matlab/R2007a/temp');<br />

List of all arguments:<br />

format: 'xml'<br />

maxHeight: 150<br />

maxWidth: 200<br />

outputDir: 'C:/matlab/R2007a/temp'<br />

script: 'ipscript.m'<br />

4-43

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!