Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

50 Tips And Tricks For MongoDB Developers Get The Most Out Of Your Database

Authors: Kristina Chodorow

1st Edition

1449304613, 978-1449304614

More Books

Students also viewed these Databases questions

Question

Find the covariance and correlation between a bX and c dY .

Answered: 1 week ago