Hi,
I need to create a for loop like
for i=1:size(A,1)
Matrix(index)(:,i)= expression
end
I want to get a list of matrix like
Matrix1,Matrix2,Matrix3,Matrix4...
is that possible?

 채택된 답변

KSSV
KSSV 2019년 4월 1일
편집: KSSV 2019년 4월 1일

0 개 추천

A = zeros(2,2,10) ;
for i = 1:10
A(:,:,i) = rand(2) ;
end
A(:,:,1)
A(:,:,3)
In your case follow:
for i=1:size(A,1)
Matrix(:,:,i)= expression ;
end

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

질문:

2019년 4월 1일

편집:

2019년 4월 1일

Community Treasure Hunt

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

Start Hunting!

Translated by