matlab里怎么运用脚本?
来源:百度知道 编辑:UC知道 时间:2024/08/20 10:18:25
我想在MATLAB里运用脚本,就是把要分析的文件的地址都写在1个文本文件里,格式如下:
c:\mat\dd.txt
d:\mat\aa.txt
让MATLAB一个个自动分析。需要怎么写程序,希望高手回答下,不甚感激!!
按1楼的方法,每个文本计算执行后会出现:
MATLAB:unassignedOutputs
Waring:1 visible figure(s) exist at MCR termination
If your application has terminated unexpectedly, please note that applications generated by MATLAB Compiler when there are no visible figure windows.See the documentation for WaitForFiguresToDie and WAITFORCALLBACKS for more information.
Error in==>test at 2
???Output argument "c"(and mybe others)not assigned during call to "d:\test\test_mcr\test.m(test)"
这是什么原因?加了CLOSE ALL以后,第一段话没了,可ERROR开始的那段还会有?请指教!
c:\mat\dd.txt
d:\mat\aa.txt
让MATLAB一个个自动分析。需要怎么写程序,希望高手回答下,不甚感激!!
按1楼的方法,每个文本计算执行后会出现:
MATLAB:unassignedOutputs
Waring:1 visible figure(s) exist at MCR termination
If your application has terminated unexpectedly, please note that applications generated by MATLAB Compiler when there are no visible figure windows.See the documentation for WaitForFiguresToDie and WAITFORCALLBACKS for more information.
Error in==>test at 2
???Output argument "c"(and mybe others)not assigned during call to "d:\test\test_mcr\test.m(test)"
这是什么原因?加了CLOSE ALL以后,第一段话没了,可ERROR开始的那段还会有?请指教!
dir命令读取全部文件,然后再传给程序处理;
DIR List directory.
DIR directory_name lists the files in a directory. Pathnames and
wildcards may be used. For example, DIR *.m lists all the M-files
in the current directory.
D = DIR('directory_name') returns the results in an M-by-1
structure with the fields:
name -- filename
date -- modification date
bytes -- number of bytes allocated to the file
isdir -- 1 if name is a directory and 0 if not
楼上解释了,Matlab中文论坛里有完整答案