Command for Matlab standard output

I am calling Matlab from the Windows command line through another program (LS-OPT). LS-OPT looks for the string 'N o r m a l' as the standard output from Matlab. Does anyone know what command produces a 'standard output' in Matlab? I have tried fprintf, sprintf, disp and none of these work. In perl, the command for a standard output is print. So what would the equivalent command be in Matlab?
More detail provided here .

2 件のコメント

Jan
Jan 2015 年 5 月 15 日
編集済み: Jan 2015 年 5 月 15 日
You must be member of the LS-OPT list to obtain more information by following the link:
You must be signed in and a member of this group to view and participate in it.
Please show us, how you call Matlab from the Windows command line.
Adwait
Adwait 2015 年 5 月 15 日
This is what is executed on the Windows command line:
matlab -nodesktop -wait -r f_calc_new
The script f_calc_new is:
function f_calc_new
x= 1.5;
y= 1.1;
f = sin(4*x)-2*x + x^2 + sin(4*x)-2*x + x^2;
fid = fopen('f','w+');
fprintf(fid,'%f',f);
fprintf('N o r m a l');
exit;
These discussions make me think that the standard output is different from command window output:
But I'm not familiar with .bat files so I'm not sure what I need to do to move the command window output to the standard output.
Thanks.

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

 採用された回答

Adwait
Adwait 2015 年 5 月 15 日
編集済み: Adwait 2015 年 5 月 15 日

0 投票

I haven't found any Matlab command that outputs to the Windows command line. One workaround is to use the system command:
system('echo N o r m a l');
This won't open a command line prompt so it would just execute in the background.

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeEntering Commands についてさらに検索

質問済み:

2015 年 5 月 15 日

編集済み:

2015 年 5 月 15 日

Community Treasure Hunt

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

Start Hunting!

Translated by