Create a cell array, called A, with the following contents: a. Make a copy of A called B. (Nothing complicated: B = A is sufficient.) In B, change the ‘t’ in ‘Matlab’ to ‘T’ by accessing that element of the cell array. b. Make a character array C that contains ‘Simulink’, by extracting it from the cell array. c. Add a 3rd row to the matrix in B{2,1} with the numbers 4,7. (After this step, B{2,1} should be [3, 9; 8, 2; 4, 7].

Respuesta :

CPED

Answer:

Following is created a cell array, called A with mentioned contents:

clc

clear all

close all

A={'Matlab' 'Simulink';[3,9;8,2] [2;8;5]};

B=A;

B{1,1}(3)='T'

C=A{1,2}

B{2,1}=[B{2,1};4,7]

Explanation:

Step-by-step explanation is as follows:

  1. Creation of A as required.         A={'Matlab' 'Simulink';[3,9;8,2] [2;8;5]};
  2. Making a copy of A called B.    B=A;    
  3. In B, change the ‘t’ in ‘Matlab’ to ‘T’ by accessing that element of the cell array.                                     B{1,1}(3)='T'
  4. Make a character array C that contains ‘Simulink’, by extracting it from the cell array.                             C=A{1,2}
  5. Add a 3rd row to the matrix in B{2,1} with the numbers 4,7. (After this step, B{2,1} should be [3, 9; 8, 2; 4, 7].

                                                            B{2,1}=[B{2,1};4,7]