error when using {}
11 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Matlab Pro
el 12 de Mayo de 2024
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 comentarios
Ver también
Categorías
Más información sobre Resizing and Reshaping Matrices en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!