I have a 1D logical vector, a cell array, and a string value I want to assign.
I tried \"cell{logical} = string\" but I get the following error:
The
As H.Muster said, deal
is the way to go here. The reason for the brackets is that (following H.Muster's setup) a{b}
returns a comma-separated list; the brackets need to be placed around this list to concatenate it into a vector. Running help lists
in Matlab might further clarify, as might the documentation on comma-separated lists
Edit: The answer provided by user2000747 seems much cleaner than using deal
.