function in a loop in matlab
12 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi!
how could i use a funktion in for loop in matlab.
as an exemple :
%
for i=1:4
[out1 out2]=function_name(input1,input2)
end
i want to get out1 and out2 after each i.
like this: OUTPUT1=[out1;out1;out1;out1]
OUTPUT2=[out2;out2;out2;out2]
thank you!
1 Kommentar
Akzeptierte Antwort
Image Analyst
am 14 Feb. 2013
Your solution looks fine if out1 and out2 are row vectors, and OUTPUT1 and out1, and OUTPUT2 and out2 have the same number of columns. Did you have any other questions (otherwise you could have just deleted your question before anyone answered it if you solved it yourself)?
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!