ファイルの名前の作成について
4 views (last 30 days)
Show older comments
次のような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 Comments
Accepted Answer
Shunichi Kusano
on 25 Jun 2020
こんにちは。
nameの中の各項を一つずつ検討していくとミスに気付くことができます。この場合、thrname(j)をthrname{j}に修正すると大丈夫です。
More Answers (0)
See Also
Categories
Find more on String Parsing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!