function in a loop in matlab

조회 수: 2 (최근 30일)
Rica
Rica 2013년 2월 14일
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
Azzi Abdelmalek
Azzi Abdelmalek 2013년 2월 14일
What is your problem?

댓글을 달려면 로그인하십시오.

채택된 답변

Image Analyst
Image Analyst 2013년 2월 14일
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개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by