0% found this document useful (0 votes)
8 views

Quiz_3.pdf

The document presents the results of Quiz 3, detailing the scores and questions answered by a student. The student achieved a score of 5 out of 6, equivalent to 83.33%. The quiz includes various questions related to vector magnitude, conditional statements in MATLAB, and matrix operations.

Uploaded by

neelshah2104
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Quiz_3.pdf

The document presents the results of Quiz 3, detailing the scores and questions answered by a student. The student achieved a score of 5 out of 6, equivalent to 83.33%. The quiz includes various questions related to vector magnitude, conditional statements in MATLAB, and matrix operations.

Uploaded by

neelshah2104
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Quiz 3 - Results

Attempt 1 of 2

Written Feb 16, 2024 4:01 PM - Feb 16, 2024 4:21 PM

Attempt Score 5 / 6 - 83.33 %


Overall Grade (Highest Attempt) 5 / 6 - 83.33 %

Question 1

Compute the magnitude for the following vector:

z = [15 + 13i, -13 + 14i, 12 - 17i]

The magnitude is [magnitude]


___[34.5254]___ (34.525)

Question 2

If x = -5, which branch of the if statement is executed.

mVal = 2;
nVal = 6;

if (x >= mVal) && (x <= nVal)


disp('Value within specified range.')
elseif (x > mVal)
disp('Value exceeds maximum value.')
else
disp('Value is below minimum value.')
end

if

elseif

else

code has errors

Question 3

3 4 5 5 8 9
If S = [ ] and T = [ ]; then perform the following operations
9 16 25 4 16 25
and find out which of the given options has correct results.

i. S ~=T
ii. S < T

1 1 0 1 1 1
i) [ ] & ii) [ ]
1 0 1 1 0 1

1 1 1 1 0 1
i) [ ] & ii) [ ]
1 0 1 1 0 1

1 1 1 1 1 1
i) [ ] & ii) [ ]
1 0 0 0 1 0

1 1 0 1 1 1
i) [ ] & ii) [ ]
1 1 1 1 0 1
None of the above

Question 4

The function

has one minimum point in the interval .

Find the minimum value of y

-2.4348

2.7376

-2.7376

Question 5

Given:

A =[5,6,7;8,9,10;11,12,13];
B=[1,0,0;1,9,2;0,-2,3];

Write a statement that XORs A and B, save the result in a matrix C, then multiple A and C, and save the
multiplication result in matrix D, finally calculate the min of the matrix D.

100

0 -2 3

755

Question 6

The following MATLAB code will give you an infinite loop

count = 0

sum = 0

while sum <= 1000

count = count + 2

end

Which of the following statements you will place inside the while loop to make the code produce a sum of
1056?

count = count + sum

sum = sum + count


This study source was downloaded by 100000878964471 from CourseHero.com on 05-22-2024 19:25:24 GMT -05:00

sum = count
https://www.coursehero.com/file/228078672/Quiz-3pdf/

for count = 1:1000

None of the above

Done

Powered by TCPDF (www.tcpdf.org)

You might also like