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
You can try this
a = cell(10,1); % cell array b = rand(1,10)>0.5; % vector with logicals myString = 'hello'; % string [a{b}] = deal(myString);
It results in:
a = 'hello' [] [] 'hello' 'hello' [] 'hello' 'hello' [] []