Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a cell array called cellar that contains the following: [sin] [0][2 ][ /100] [0 1 1 0] [cos] [- ][ ][ /15] [0 0

image text in transcribedCreate a cell array called cellar that contains the following:

[sin] [0][2 ][ /100] [0 1 1 0]

[cos] [- ][ ][ /15] [0 0 0 1]

[tan] [- /2.2][ /2.2][ /20] [0 1 1 0]

[atan] [-10][10][0.02] [1 1 1 0]

[acot] [-8][8][0.05] [0 1 0 1]

[exp] [-5][10][0.1] [1 1 0 1]

[log] [0.1][8..5][0.5] [0 0 1 1]

Each row of the cell array cellar should have the following structure:

[function name] [min][max][step] [vector]

The first cell of each row contains a string representation of a MATLAB build-in function; the second cell stores three sub-cells, containing numerical values which specify the beginning of an interval, the end of an interval, and the interval discretization size, respectively; the third cell contains a logical row vector.

(a) Create the cell array cellar described above. Without assuming the number of rows of the cell array cellar:

(b) write an expression that refers to the string contained in the first cell of the fourth row of the cell array,

(c) write an expression that refers to the discretization step size contained in the third subcell of the second cell of the last row of the cell array,

(d) by looping through the rows of the cell array, delete the second element from the logical row vector contained in the third cell of each row,

(e) swap the third cell in the first row with the third cell in the second row of the cell array, (f) swap the fifth and sixth rows of the cell array,

(g) assign to variable x a row vector of regularly spaced values from min to max using step as the increment between elements, where min, max, and step are values obtained from the corresponding sub-cells of the second cell of the seventh row of the cell array,

(h) plot the function specified by the string stored in the first cell of the seventh row of the cell array versus vector x that was generated in part (g),

(i) by looping through the rows of the cell array, plot each function (in a separate figure window) whose name is given as a string in the first cell of the corresponding row. Each function should be plotted over the interval specified by the values min and max contained in the first two sub-cells of the second cell of the corresponding row. Use the value step contained in the third sub-cell as the step size. (In other words, repeat part (h) for all rows of the cell array.)

You are to create a cell array called cellar that contains the following- [sin] [[0]2]/100] [0 110] [cos] [[-m][m][w15]] [0 0 0 1] [tan] [[- /22][ /22][#20]] [0 1 1 0] [atan] [-10]010][0.02 [1 110] [acot] [-][8J0O.05)] 0 10 1] [exp] [[5][10][01]] [11 01] [logl [[0.1][8.510.5 0011] Each row of the cell aray cellar should have the following structure: [function name] [[min][max ]Istepl [vector] The first cell of each row contains a string representation of a MATLAB build-in function; the second cell stores three sub-cells, containing numerical values which specify the begimning of an interval, the end of an interval, and the interval discretization size, respectively, the third cell contains a logical row vector. cell aray cellar described above. (a) Create the array Without assuming (b) write an expression that refers to the string contained in the first cell of the fourth row of the number of rows of the cell aray cellar the cell array (c) write an expression that refers to the discretization step size contained in the third sub- cell of the second cell of the last row of the cell array (d) by looping through the rows of the cell aray, delete the second element from the logical row vector contained in the third cell of each row, (e) swap the third cell in the first row with the third cell in the second ro of the cell array (f) swap the fifth and sixth rows of the cell array g) assign to variable x a row vector of regularly spaced values from min to max using step as the increment between elements, where min, max, and step are values obtaimed from the corresponding sub-cells of the second cell of the seventh row of the cell array (h) plot the function specified by the string stored in the first cell of the seventh row of the cell aray versus vector x that was generated in part (g), a) by looping through the rows of the cell array, plot each function (in a separate figure window) whose name is given as a string in the first cell of the corresponding row. Each function should be plotted over the interval specified by the values min and max contained in the first two sub-cells of the second cell of the corresponding row. Use the value step contained in the third sub-cell as the step size. In other words, repeat part (h) for all rows of the cell aray.) You are to create a cell array called cellar that contains the following- [sin] [[0]2]/100] [0 110] [cos] [[-m][m][w15]] [0 0 0 1] [tan] [[- /22][ /22][#20]] [0 1 1 0] [atan] [-10]010][0.02 [1 110] [acot] [-][8J0O.05)] 0 10 1] [exp] [[5][10][01]] [11 01] [logl [[0.1][8.510.5 0011] Each row of the cell aray cellar should have the following structure: [function name] [[min][max ]Istepl [vector] The first cell of each row contains a string representation of a MATLAB build-in function; the second cell stores three sub-cells, containing numerical values which specify the begimning of an interval, the end of an interval, and the interval discretization size, respectively, the third cell contains a logical row vector. cell aray cellar described above. (a) Create the array Without assuming (b) write an expression that refers to the string contained in the first cell of the fourth row of the number of rows of the cell aray cellar the cell array (c) write an expression that refers to the discretization step size contained in the third sub- cell of the second cell of the last row of the cell array (d) by looping through the rows of the cell aray, delete the second element from the logical row vector contained in the third cell of each row, (e) swap the third cell in the first row with the third cell in the second ro of the cell array (f) swap the fifth and sixth rows of the cell array g) assign to variable x a row vector of regularly spaced values from min to max using step as the increment between elements, where min, max, and step are values obtaimed from the corresponding sub-cells of the second cell of the seventh row of the cell array (h) plot the function specified by the string stored in the first cell of the seventh row of the cell aray versus vector x that was generated in part (g), a) by looping through the rows of the cell array, plot each function (in a separate figure window) whose name is given as a string in the first cell of the corresponding row. Each function should be plotted over the interval specified by the values min and max contained in the first two sub-cells of the second cell of the corresponding row. Use the value step contained in the third sub-cell as the step size. In other words, repeat part (h) for all rows of the cell aray.)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intranet And Web Databases For Dummies

Authors: Paul Litwin

1st Edition

0764502212, 9780764502217

More Books

Students also viewed these Databases questions

Question

How do modern Dashboards differ from earlier implementations?

Answered: 1 week ago