ファイルの名前の作成について
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Qiong Ma
am 25 Jun. 2020
Kommentiert: Qiong Ma
am 26 Jun. 2020
次のようなscriptでファイルの名前を作りたいですが、結果はうまく出ていていなかったです。
例えばどうM_m9_r9_thr0.001というような名前が得られますでしょうか。
r1=[6 6 9 9];
r2=[6 9 6 9];
thr=[0.05 0.01 0.001];
thrname={'0.05' '0.01' '0.001'};
voi_name={
'M'...
};
for h=1:length(subject)
for j=1:length(thr)
for u=1:length(r1)
for v=1:length(voi_name)
for s=1:numsess
name = [voi_name{v} '_m' num2str(r1(u)) '_r' num2str(r2(u)) '_thr' thrname(j)];
end
end
end
end
end
0 Kommentare
Akzeptierte Antwort
Shunichi Kusano
am 25 Jun. 2020
こんにちは。
nameの中の各項を一つずつ検討していくとミスに気付くことができます。この場合、thrname(j)をthrname{j}に修正すると大丈夫です。
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu String Parsing finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!