Question
Matlab Type the following in the command window and press enter v = [1:7:765] Question: What did the command do? How can you determine how
Matlab
Type the following in the command window and press enter v = [1:7:765] Question: What did the command do? How can you determine how many elements the vector have has? How many elements does the vector have? Question: What is the value of the 53 element? Question: How can a column vector be created using the colon operator?
Type the following in the command window & press enter m = [3,4,-3,8; 4,3,6,0; 1,3,4,7] Question: What was created? How many rows and columns are there? Question: Which command would index the value at the 2nd row, 3rd column? a. m(3,2) b. m(2,3) c. m(2,1) d. m(1,2) Question: What command would get all of the values in column 4? a. m(:,3) b. m(3,:) c. m(4,:) d. m(:,4)
Type the following in the command window. Press enter after every line X = [1:10] Y = [1:2:20] M = [Y; X] Question: What was created? Type the command M = M'. What happened?
Type the following in the command window & press enter Number = input('enter a number: ') Question: What happens once enter is pressed?
Type the following in the command window & press enter. display(m) Notice it displays the variable m, which was a matrix from earlier.
Type the following in the command window & press enter. fprintf('pie is .2f%, pi) Notice it is similar to C for displaying floats. pi is a MATLAB constant
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