Output Filename With Print Command

13 ビュー (過去 30 日間)
Steve
Steve 2013 年 4 月 1 日
The following command prints a postscript file of the current Simulink diagram:
print('-dps', '-s', gcs)
MATLab suggests the following to specify an output file name:
SPECIFYING THE OUTPUT FILE:
<filename> % String on the command line
'<filename>' % String passed in when using function form of PRINT
However, if I use it in the following way:
filename = 'Lies.ps'
print ('-dps', '-s', gcs, filename)
It fails because it thinks you want to print the current screen and some file named 'Lies.ps'.
What is the correct command to accomplish this monumental task?

採用された回答

Walter Roberson
Walter Roberson 2013 年 4 月 1 日
There is no '-s' option by itself, just '-s' followed as part of the same option by the modelname.
print('-dps', ['-s', gcs], filename)
  1 件のコメント
Steve
Steve 2013 年 4 月 1 日
You sir, are a miracle man!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangePrepare Model Inputs and Outputs についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by