Question: Creating Matrices 3 0 points [ 1 0 Points Per Part ] In this exercise, you create matrices manually or randomly per instructions. You may

Creating Matrices
30 points [10 Points Per Part]
In this exercise, you create matrices manually or randomly per instructions. You may need the following commands for Part C.
The command r and (n) generates an nn matrix of random numbers between 0 and 1
The command r and (m,n) generates an mn matrix of random numbers between 0 and 1
The command r andi ([min,max],m,n) generates an mn matrix of random integers between min and max numbers (inclusive)
The command [m,n]=size(A) returns two numbers, m, and n, where m is the number of rows of A and n is the number of columns of A
A. Create a matrix manually
Create the following matrices in MATLAB and display the output A=[123-4-5-6789],b=[123],c=[-11],
D=[012341234023401]
Run the following commands, display the output, and briefly describe the result of each command
x1=A(2,:);
x2=D(:,4);
aug=[Ac];
Note: You will get an error message for this command, and you need to make a minor fix to it so that the output is a 43 matrix with vector c as its 4 th row
B. Create special matrices: Use the following commands, display the output, and briefly describe the result of each command
x4= eye (8);
x5=zeros(6,3);
x6=zeros(5);
x7=ones(3,5);
x8=diag(c);
Create random matrices: Use the commands below to generate the matrices, display the output, and briefly describe the result of each command
 Creating Matrices 30 points [10 Points Per Part] In this exercise,

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!