Question: Matlab Required 4. MATLAB flow-control exercise. [13 points] (a) Write a MATLAB code which takes a 6-digit number as input (represent it as a vector)

 Matlab Required 4. MATLAB flow-control exercise. [13 points] (a) Write a

Matlab Required

4. MATLAB flow-control exercise. [13 points] (a) Write a MATLAB code which takes a 6-digit number as input (represent it as a vector) and creates a 6x6 diagonal matrix using numbers of your input. Use for loop to create the code and test it using the last six digits of your student ID. Repeat the same problem with diag function in MATLAB. (b) Write a MATLAB code which generates a geometric sequence 42, 35, 28, 21, 14, 7, 0 using for loop. (c) Write a MATLAB code which asks a user for an integer number and computes the factorial of that number. Use while loop to create the code

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!