ttps://blackboard.sanjac.edu/webapps/assessment/take/laundh sprourse assessment.
ID: 3908928 • Letter: T
Question
ttps://blackboard.sanjac.edu/webapps/assessment/take/laundh sprourse assessment.id: 467620. 18course id 3150318 bills school google translate O Hotmail QUESTION 1 How can you use the colon operator to generate the following vector? [3 6 9 12 15 18] El linspace(3,18,6) 3:3:18 0 linspace(3,6,18) 3: 18:3 QUESTION 2 Which command can be used to find the average of vector x? mean(x) Average(x) Mode(x) sum(x) QUES TION 3 #[ 2 O 3-1 O], What will be the value of X(0)? Given the following vector Invalid 0 QUESTION 4 What is the output of the following? x=(7 >5) + ( 7 >4) + 3 Click Save and Submit to save and submit, Click Save Al Aswers to save al amsowereExplanation / Answer
Correct Format 3:3:18 first value is starting value second value is the gap third value is the upper limit Hence the above code is correct. Correct Code is mean(x) Mean is the average of the numbers in the vector. There is no function as average in the ,matlab. The remaining are sum and mode are not used for average. Hence,mean(x) is correct. It is invalid. In matlab,the indexing starts at 1. There is no index 0 in the vetor. Hence it is invalid. Answer is 5. x=(7>5)+(7>4)+3 Here a boolean operation returns 1 or 0. the both conditions are true,hence each return 1. Hence 1+1+3=5 Hence 5 is the output
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.