How to enter data in the system command?
1 回表示 (過去 30 日間)
古いコメントを表示
miguel angel torres quintero
2017 年 7 月 24 日
回答済み: Simon Henin
2017 年 7 月 24 日
Hello I have a problem with my code in matlab: I want to enter a archive in the >>here<< section as you can see in a cycle: code: file=dir('C:\Users\fyre\Documents\funciones\logs'); %directory files=strvcat(file.name); % I got the archives that a I need k=1; D=[]; for i=3:5 system('mseed2sac-2.1-win32 >>here<>') end but in each cycle i only get: system('mseed2sac-2.1-win32 >>here<>') before due to the quotes, we know that here have to change archive in each interation..
0 件のコメント
採用された回答
Simon Henin
2017 年 7 月 24 日
Use sprintf to create dynamic text, for example:
for i=3:5
system( sprintf('mseed2sac-2.1-win32 >> %s<>', files{i}) );
end
0 件のコメント
その他の回答 (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!