Put data into a matrix contained in a cell
Show older comments
I made the following cell:
Grid={1,1,1,1,1,1,[2,2]}
and was under the impression that the [2,2] term in position 7 in the cell was a 2x2 matrix. When I try to put values into the cell, ie:
Grid={1,1,1,1,1,1,[1,1]}='methanol'
I get the following error: The right hand side of this assignment has too few values to satisfy the left hand side.
This leads me to believe that the [2,2] in my cell assignment does not actually create a matrix in the cell, but does something else entirely. No matter how many values I try to feed on the right hand side of the above, I still get the error.
Can anyone enlighten me?
Thanks!
Accepted Answer
More Answers (1)
Walter Roberson
on 10 Nov 2013
Grid = {1, 1, 1, 1, 1, 1, cell(2,2}};
Grid = {7}{1,1} = 'methanol';
Categories
Find more on Multidimensional Arrays in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!