error when using {}
조회 수: 11 (최근 30일)
이전 댓글 표시
Hi guys, im trying to run a software by Matlab and do some analysis for some models and this 'Periodandfrequencies' is an example of some results. But I am facing error when I want to keep the result inside the cell-array. Basicaly I want it to be iix1 cell aray and each cell is 12x7 Table.
댓글 수: 0
답변 (1개)
Matlab Pro
2024년 5월 12일
Hi
What you are doing is wrong:
You have a variable called "Periodandfrequencies" which is a "table" (defined on line #335 @ your code)
but on the next line - you relate is a a cell.
The solution is easy - create another variable, of type cell (with the dimentions iix1) that will hold the tables:
Periodandfrequencies_container is a cell array. Each cell of it contains a table of size 3x4
iMax = 5;
Periodandfrequencies_container = cell(iMax,1);
for ii = 1:iMax
A = rand(3,4);
Periodandfrequencies = array2table(A);
Periodandfrequencies_container{ii,1} = A;
end
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!