Array of Arrays

조회 수: 13 (최근 30일)
sita
sita 2011년 12월 6일
댓글: Tlotlo Oepeng 2021년 6월 4일
hi,, I have created array of arrays "myArray = createArrays(i, [60,1]);"to create array below function is used
function result = createArrays(nArrays, arraySize)
result = cell(1, nArrays);
for i = 1 : nArrays
result{i} = zeros(arraySize);
end
end
where i is increasing in loop.same way i want to store an array in increasing loop..how to store arrays in this ..how to print the content. 'i' increases in loop every time i want to store x(60,1) in my array for 350 times
Thanks , Sita
  댓글 수: 1
Jan
Jan 2011년 12월 6일
Please format your code as explained in the "Markup help" link on this page. I've done this for you.

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

채택된 답변

Jan
Jan 2011년 12월 6일
I do not get the point: Your program does store an array inside a loop already. What is x(60,1)?
Perhaps you are looking for something like this:
c = cell(1, 350);
c(:) = {zeros(60, 1)};
  댓글 수: 2
sita
sita 2011년 12월 6일
yes ,i am looking for same...thanks....
Tlotlo Oepeng
Tlotlo Oepeng 2021년 6월 4일
the how do you add vaules to each array?
first output an array of U going into first array 2nd U and so forth?

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by