Question
Problem 1 (20 points) (a) Create a cell array cells with the numbers 1 2 3 in the 1st row (each in one cell), the
Problem 1 (20 points)
(a) Create a cell array cells with the numbers 1 2 3 in the 1st row (each in one cell), the vectors [11 12] [12 14] [13 16] in the 2nd row (each in one cell), and the strings 'how' 'are' 'you' in the third row (each in one cell).
(b) In one command, assign the numbers stored in the 1st row of the cell array to a new (numerical) vector containing 3 elements (NOT to a new cell array; check the data type in the Workspace).
(c) In one command, assign the vectors stored in the 2nd row of the cell array to a new (numerical) matrix with 3 rows and 2 columns such that each vector from the cell array is in one row (NOT to a new cell array; check the data type in the Workspace).
(d) Execute the following commands in the Command Window: cells{3,:}, cells(3,:), and [cells{3,:}]. Explain what each command does and the differences in output between the commands.
Problem 1 (20 points (a) Create a cell array cells with the numbers 1 2 3 in the 1s row (each in one cell), the vectors 11 12 [12 14 I13 161 in the 2nd row (each in one cell), and the strings how are you' in the third row (each in one cell). (b) In one command, assign the numbers stored in the 1st row of the cell array to a new (numerical) vector containing 3 elements (NOT to a new cell array, check the data type in the Workspace (c) In one command, assign the vectors stored in the 2nd row of the cell array to a new (numerical matrix with 3 rows and 2 columns such that each vector from the cell array is in one row (NOT to a new cell array, check the data type in the Workspace). (d) Execute the following commands in the Command Window: cells13, cells (3, and cells13,: J. Explain what each command does and the differences in output between the commandsStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started