ERROR in file: C:\..\..\..
ERROR: Undefined function or variable 'modelname'.
Error in sub-m-file (line 63)
legacy_code( 'slblock_generate', specs, modelname);
Error in m-file (line 11)
sub-m-file
Error in run (line 63)
evalin('caller', [script ';']);
最后,要在命令提示符窗口显示输出,只需将 matlab 控制台记录到一个包含 -logfile logfile.txt(另外使用 -wait)的文件中,然后调用批处理命令 type logfile.txt
This starts MATLAB without the desktop or splash screen, logs all output to stdout and stderr, exits automatically when the statement completes, and provides an exit code reporting success or error.