필터 지우기
필터 지우기

how to save for loop results

조회 수: 2 (최근 30일)
vijay
vijay 2013년 1월 3일
Hello everyone Gud evening and happy new yr i m giving one matlab program below
n=5
for i=1:n
a=magic(i)
end
i want to modify this program such that all the 5 resulting matrices are saved and accessed by name
a1= magic 1 matix
a2= magic 2 matix
a3= magic 3 matix
a4= magic 4 matix
a5= magic 5 matix
would anybody please help me?

답변 (2개)

Walter Roberson
Walter Roberson 2013년 1월 3일
  댓글 수: 2
vijay
vijay 2013년 1월 3일
thank u very much sir. bt i havnt got the solution from the link given by you.
José-Luis
José-Luis 2013년 1월 3일
What did you try or which part did you not understand?

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


Hello kity
Hello kity 2013년 1월 3일
편집: Hello kity 2013년 1월 3일
Creat cell array/ or normal matrix
n=5
a=cell(1,5)
for i=1:n
a{i}=magic(i)
end

카테고리

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