Q:

Create a 2 x 2 cell array using the cell function and then put values in the individual elements. Then, insert a row in the middle so that the cell array is now 3 x 2

0

Create a 2 x 2 cell array using the cell function and then put values in the individual elements. Then, insert a row in the middle so that the cell array is now 3 x 2. 

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

>> mycell = cell(2);

>> mycell{1} = 'EK';

>> mycell{2} = 127;

>> mycell{3} = 1:3;

>> mycell{4} = 'A1'

mycell = 

 'EK' [1x3 double]

 [127] 'A1' 

>> mycell(3,:) = mycell(2,:)

mycell = 

 'EK' [1x3 double]

 [127] 'A1' 

 [127] 'A1' 

>> mycell{2,1} = 'hi';

>> mycell{2,2} = 'there'

mycell = 

 'EK' [1x3 double]

 'hi' 'there' 

 [127] 'A1' 

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now