Execute functions automatically
1 view (last 30 days)
Show older comments
Dear all, I have a problem: I have to execute for 1000-2000 times a command like: wavef1=Readwav('ch1probe001.trc'), wavef2=Readwav('ch1probe002.trc'), wavef3=Readwav('ch1probe003.trc'), etc. Any suggestion? I don't know if I can use a for cicle wavef(k)=Readwav('ch1probe(k).trc') for k=001:1:1000...
0 Comments
Accepted Answer
Daniel Shub
on 19 Jul 2011
This is basically FAQ 4.6
You really do not want to do this. You can use cell arrays to accomplish something very similar:
wavef = cell(1000, 1);
for ii = 1:1000
wavef{ii} = redwav(['ch1probe', num2str(ii), '.trc']);
end
Note the {} to make a cell array.
More Answers (0)
See Also
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!