変数名にsprintfのような関数を使用できますか?
Mostra commenti meno recenti
csvのファイル名がname_segment_speed.csvというように名前と速度で特徴づけています。
右辺のcsvにsprintfは適応できたのですが、左辺の変数名にsprintfを使用すると、
name = 'A';
speed = 'normal';
sprintf('%s_lumber_%s, name, speed) = readmatrix(sprintf('%s_lumber_%s.csv', name, speed));
「左辺のインデックスが右辺とサイズが適合しないため、代入は実行できません。」というエラーメッセージが出てしまいます。
変数名とcsvファイル名を自動的に統一するにはどうすればいいですか?
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Whos in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!