Question: write in MATLAB write in matlab A is array 9x9 with random number and C is array 1x9 sorted with number from array A .
9. Generate arrays D, E, F in which each element of A is raised to power 2, 3, 4 respectively. [Note: For applying an operation to each element in a matrix, you have to add "." before the actual operator. For example ".", "/" etc.] Plot D, E, F as functions of C. Show the curve in different colors. Add axes labels and a title to the plot. Show all plots in one figure using subplot command. 10. Generate two 5x5 matrices A and B of random values. Generate a new matric C such that C(ij)=1 if A(ij)>B(ij), and C(ij)=0 otherwise. 11. Solve 10 without using for loops and if condition. (Bonus mark 0.1) 9. Generate arrays D, E, F in which each element of A is raised to power 2, 3, 4 respectively. [Note: For applying an operation to each element in a matrix, you have to add "." before the actual operator. For example ". *", "/" etc.) Plot D, E, F as functions of C. Show the curve in different colors. Add axes labels and a title to the plot. Show all plots in one figure using subplot command. 10. Generate two 5x5 matrices A and B of random values. Generate a new matric C such that C(1,j)=1 if A(ij)>B(ij), and C(ij)=0 otherwise. 11. Solve 10 without using for loops and if condition. (Bonus mark 0.1)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
