KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Here's code that creates an example cell array for this question: mycell = cell([5,1]); for i = 1 : size(mycell) mystruct = struct(); mycell{i} = mystruct; mycell{i}.field1 = i; end I expected mycell{:}.field1 to do what I want, but it gives an error. I can use the following for loop: for i = 1 : size(mycell) mycell{i}.field1 end but I'd prefer a simpler or more elegant solution as a want to use all the elements of mycell.field1 as the y-variables in a plot. Any ideas?
Tags (comma-separated)
Save Edits
Cancel