Values from For Loop Iteration to save on an extra m.File
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Hello, i have a .m-File with an For Loop Iteration. This .m-File calls another .m-File ( Main.m ) to solve some Variables ( for Example 'XXX' ) from the Iteration-Value PC
for PC=850:10:870
EG=1286
Main
save test.dat XXX
end
So the Program should take every new Iteration-Step into the Main.m and solve Things in it ( for Example Variable 'XXX' ) and then save it to a new .m-File ( for Example test.dat ). The Output should looks like this:
Column1(Iteration-Steps) Column2(Value of the Variable XXX form Main.m )
850 64874
860 65879
870 69766
I hope you Guys understand my Problem, big thx!
0 Commenti
Risposta accettata
TAB
il 12 Dic 2012
Buff = zeros(numel(850:10:870),2);
Ctr = 1;
for PC=850:10:870
EG=1286
Main
Buff(Ctr, 1) = PC;
Buff(Ctr, 2) = XXX;
Ctr = Ctr+1;
end
save test.dat Buff;
0 Commenti
Più risposte (2)
Vedere anche
Categorie
Scopri di più su Configure Simulation Conditions in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!