Answered step by step
Verified Expert Solution
Question
1 Approved Answer
solve it with Matlab please Exercises 1. Create a 9x9 matrix A of random numbers. Print the number of rows, number of columns, and total
solve it with Matlab please
Exercises 1. Create a 9x9 matrix A of random numbers. Print the number of rows, number of columns, and total number of elements in A. Useful functions: size(), numel() 2. Display the 5th row and 5th column of A. 3. Calculate and display the sum of all elements of A using the built-in sum command. 4. Calculate the sum of all elements using one for loop and without using the sum command. 5. Calculate the sum of all elements using two for loops, one for rows and one for columns index, and without using the sum command. 6. Generate a new matrix B, which is the transpose of A. Look for the built-in function in the help and use it. 7. Generate a new matrix B, which is the transpose of A. Use the for loop without using the built-in function. 8. Convert matrix A to a one-dimensional array C. Sort C using the built-in sort function in descending order. 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(1,j)=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
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