Unexpected prompt characters on command line output
2 ビュー (過去 30 日間)
古いコメントを表示
I am running MATLAB from command line using the following command on a linux system
$ matlab -nojvm -nodisplay < main.m
The command line ouput contains unexpected prompt characters (">>") at the beginning of the ouptut. The expected output, which is obtianed when running the code in the MATLAB command window is
>> main
Dimension 1: Range = [-9.93,9.93]
Dimension 2: Range = [-9.93,9.93]
Dimension 3: Range = [-9.93,9.93]
Size of a: 15180
Size of b: 32509
However, when run from the command line, the output looks like
$ matlab -nodisplay -nojvm < Collocate.m
< M A T L A B (R) >
Copyright 1984-2023 The MathWorks, Inc.
R2023b Update 5 (23.2.0.2459199) 64-bit (glnxa64)
November 28, 2023
For online documentation, see https://www.mathworks.com/support
For product information, visit www.mathworks.com.
>> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >>>>>>>>Dimension 1: Range = [-9.93,9.93]
Dimension 2: Range = [-9.93,9.93]
Dimension 3: Range = [-9.93,9.93]
>> >> >> >> >> >> Size of a: 15180
>> Size of b: 32509
And keeps going on for a few more lines. I can't understand where the prompt symbols ">>" come from. Is there any way of getting rid of these?
0 件のコメント
採用された回答
Steven Lord
2024 年 6 月 7 日
Rather than piping the contents of the file to MATLAB, do you see this same behavior if you use the -batch startup option listed on this documentation page? I think that is more in-model for the operation you're trying to perform.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Startup and Shutdown についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!