run multiple inputs on an m-file to get multiple putputs in a loop
Afficher commentaires plus anciens
Thank yous o much for reading.. I want to put a .m file in a loop but with three other arrays sig and acs.and af=2.However size(sig)=8,74,80,10 and size(acs)=8,20,80,10. The m-file outputs recon and ws how can one store recon & ws for n=1:10. Sorry for the example:
for n=1:10 sig(n)=sig(:,:,:,n) acs(n)=acs(:,:,:,n) af=2 [recon,ws]=open(sig,acs,af) %m-file called open.m % save output recon(n) & ws(n) %?? end
Thank you so so much.
Réponses (1)
Jan
le 23 Mar 2011
I'm not sutre what you mean by "save recon(n)", perhaps this:
recon = zeros(1, 10);
ws = zeros(1, 10);
for n = 1:10
sig_n = sig(:,:,:,n);
acs_n = acs(:,:,:,n);
af = 2;
[recon(n), ws(n)] = open(sig_n, acs_n, af);
end
Catégories
En savoir plus sur Data Import and Export dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!