Exam 15: Matlab

arrow
  • Select Tags
search iconSearch Question
  • Select Tags

Shown below are MATLAB inputs.Complete each output: \ggC=[1,3,-2,0] \ggD=3./C \ggD=

Free
(Essay)
4.9/5
(37)
Correct Answer:
Verified

D=311.5 inf D = 3 \quad 1 - 1.5 \text { inf }

The following matrices have already been defined in MATLAB: A=[241013163718849253121517]B=[135106131153120221258]A = \left[ \begin{array} { c c c c } 2 & 4 & 10 & 13 \\16 & 3 & 7 & 18 \\8 & 4 & 9 & 25 \\3 & 12 & 15 & 17\end{array} \right] \quad B = \left[ \begin{array} { c c c c } - 1 & 3 & - 5 & 10 \\6 & 13 & 11 & - 5 \\- 3 & 12 & 0 & 2 \\2 & 12 & - 5 & 8\end{array} \right] What would be the outputs of the following MATLAB inputs: - >>B(2:5)> > \mathrm { B } ( 2 : 5 )

Free
(Essay)
4.8/5
(28)
Correct Answer:
Verified

6323\begin{array} { l l l l } 6 & - 3 & 2 & 3\end{array}

What is the MATLAB command for calculating the square root of a number? a. square_root b. sqrt c. sqr d. sq_rt

Free
(Short Answer)
4.7/5
(30)
Correct Answer:
Verified

B

Which of the following commands are commonly used while plotting in MATLAB?

(Multiple Choice)
4.8/5
(35)

The following matrices have already been defined in MATLAB: A=[241013163718849253121517]B=[135106131153120221258]A = \left[ \begin{array} { c c c c } 2 & 4 & 10 & 13 \\16 & 3 & 7 & 18 \\8 & 4 & 9 & 25 \\3 & 12 & 15 & 17\end{array} \right] \quad B = \left[ \begin{array} { c c c c } - 1 & 3 & - 5 & 10 \\6 & 13 & 11 & - 5 \\- 3 & 12 & 0 & 2 \\2 & 12 & - 5 & 8\end{array} \right] What would be the outputs of the following MATLAB inputs: - >>min(A)> > \min ( \mathrm { A } )

(Essay)
4.8/5
(24)

Suppose you have defined x = [1,2,3] and y = [2,4,6] in the Command Window.Determine the result of the following MATLAB operation: >>x+y> > \mathbf { x } + \mathbf { y } a. ans = 3 6 9 b. ans= 1 2 3 2 4 6 c. ans= 6 12 d. ans= 18

(Short Answer)
4.8/5
(31)

The following matrices have already been defined in MATLAB: A=[241013163718849253121517]B=[135106131153120221258]A = \left[ \begin{array} { c c c c } 2 & 4 & 10 & 13 \\16 & 3 & 7 & 18 \\8 & 4 & 9 & 25 \\3 & 12 & 15 & 17\end{array} \right] \quad B = \left[ \begin{array} { c c c c } - 1 & 3 & - 5 & 10 \\6 & 13 & 11 & - 5 \\- 3 & 12 & 0 & 2 \\2 & 12 & - 5 & 8\end{array} \right] What would be the outputs of the following MATLAB inputs: - A(4:8)\gg \mathrm { A } ( 4 : 8 )

(Essay)
4.9/5
(36)

The following matrices have already been defined in MATLAB: A=[241013163718849253121517]B=[135106131153120221258]A = \left[ \begin{array} { c c c c } 2 & 4 & 10 & 13 \\16 & 3 & 7 & 18 \\8 & 4 & 9 & 25 \\3 & 12 & 15 & 17\end{array} \right] \quad B = \left[ \begin{array} { c c c c } - 1 & 3 & - 5 & 10 \\6 & 13 & 11 & - 5 \\- 3 & 12 & 0 & 2 \\2 & 12 & - 5 & 8\end{array} \right] What would be the outputs of the following MATLAB inputs: - >A(2:3,:)> \mathrm { A } ( 2 : 3 , : )

(Essay)
4.8/5
(32)

an M-file is used to when you write a program that is more than a few lines long.

(True/False)
4.7/5
(36)

If you define x=2/3\mathrm { x } = 2 / 3 , and then type format long\mathbf { format~ long} , how will the value of x\mathbf { x } be displayed? a. x=0.66666666666666666666667\mathrm { x } = 0.66666666666666666666667 b. x=0.66666666666667\mathrm { x } = 0.66666666666667 c. x=0.67000000000000\mathrm { x } = 0.67000000000000 d. x=2/3\mathrm { x } = 2 / 3

(Short Answer)
4.9/5
(30)

If you define x=2/3\mathbf {x = 2 / 3} , and then type format rat\mathbf { format~ rat} , how will the value of x\mathbf { x } be displayed? a. x=0.66666666667x = 0.66666666667 b. x=0.6667x = 0.6667 c. x=0.67x = 0.67 d. x=2/3x = 2 / 3

(Short Answer)
4.9/5
(40)

The following matrices have already been defined in MATLAB: A=[241013163718849253121517]B=[135106131153120221258]A = \left[ \begin{array} { c c c c } 2 & 4 & 10 & 13 \\16 & 3 & 7 & 18 \\8 & 4 & 9 & 25 \\3 & 12 & 15 & 17\end{array} \right] \quad B = \left[ \begin{array} { c c c c } - 1 & 3 & - 5 & 10 \\6 & 13 & 11 & - 5 \\- 3 & 12 & 0 & 2 \\2 & 12 & - 5 & 8\end{array} \right] What would be the outputs of the following MATLAB inputs: - >> length (A)> > \text { length } ( \mathrm { A } )

(Essay)
4.8/5
(36)

The following matrices have already been defined in MATLAB: A=[241013163718849253121517]B=[135106131153120221258]A = \left[ \begin{array} { c c c c } 2 & 4 & 10 & 13 \\16 & 3 & 7 & 18 \\8 & 4 & 9 & 25 \\3 & 12 & 15 & 17\end{array} \right] \quad B = \left[ \begin{array} { c c c c } - 1 & 3 & - 5 & 10 \\6 & 13 & 11 & - 5 \\- 3 & 12 & 0 & 2 \\2 & 12 & - 5 & 8\end{array} \right] What would be the outputs of the following MATLAB inputs: - >>max(B)> > \max ( \mathrm { B } )

(Essay)
4.8/5
(40)

Suppose you have defined x=[1,2,3] and y=[2,4,6]x = [ 1,2,3 ] \text { and } y = [ 2,4,6 ] in the Command Window.Determine the result of the following MATLAB operation: >>xy> > x \cdot { } ^ { * } y a. ans= 3 6 9 b. ans= 2 8 18 b. ans= 1 2 3 4 5 6 c. ans= 6 12

(Short Answer)
4.8/5
(29)

The part of the screen where you enter variables and issue MATLAB commands is known as the

(Multiple Choice)
4.9/5
(40)

Find the corresponding MATLAB output: \gg factorial (3)( 3 )  ans =\text { ans } =

(Essay)
4.8/5
(35)

What is the MATLAB command for calculating standard deviation? a. standard b. stddev c. std_dev d. std

(Short Answer)
4.9/5
(34)

To generate the set of x even numbers in the range of two to ten, what should you enter in the Command Window? a. x=2;2;10x = 2 ; 2 ; 10 b. x=2:2:10x = 2 : 2 : 10 c. x=2:10:2x = 2 : 10 : 2 d,x=2,10,2\mathrm { d } , { x } = { 2 , 1 0 , 2 }

(Short Answer)
4.8/5
(32)

You can transfer old commands from the Command History Window to the Command Window.

(True/False)
4.9/5
(30)

To clear the contents of the Command Window, type

(Multiple Choice)
4.9/5
(37)
Showing 1 - 20 of 30
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)