Question: Q.1 Given that x = [1 2; 3 4; 5 6], what is the output for mean(x) and mean(x,2). Explain the differences. (marts) Q.2 (2)
![Q.1 Given that x = [1 2; 3 4; 5 6],](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66fa3f1e73438_19066fa3f1e1a4d6.jpg)
Q.1 Given that x = [1 2; 3 4; 5 6], what is the output for mean(x) and mean(x,2). Explain the differences. (marts) Q.2 (2) Given the MATLAB code for a polynomial as f = [1 1 -4 -4], write down the corresponding function fx). (2 marks) Q.3 (6) Write a MATLAB code to represent the following polynomial function f(x) = (x + 2x + 2)(x - 2) (3 marks) Given the following matrix T below. *1991 T= 2 2 2 *3 y (2) Show how you can use MATLAB to declare matrix T as a magic square. What is the value of sum(sum(T)) ? (2 marts) (b) Show how you can determine if the matrix T is a singular matrix? 3 marks)
Step by Step Solution
There are 3 Steps involved in it
Lets go through each question step by step Q1 Given x beginbmatrix 1 2 3 4 5 6 endbmatrix Output for ... View full answer
Get step-by-step solutions from verified subject matter experts
