Save array of names
2 次查看(过去 30 天)
显示 更早的评论
Hello, I need to print a names of mesures in plot and i need an array than have a names of all measures:
name_save =
name1
name2
name3
.....
nameN
I get a new names everry loop:
for k = 1:length(l)
.....
[filepath,name,ext] = fileparts(l(k).name);
........
end
How can I save the names in a loop?
name_save(k) = name; %not working
Thank you!
0 个评论
采纳的回答
madhan ravi
2020-6-22
name_save = compose('name%d', 1:numel(l)) ; % before loop
name_save{k} ... inside loop
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Graph and Network Algorithms 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!