wtclass.wtamu.edu Lessons-2018FA INTRONUMERICAL A https://www.mccormick Symbolic
ID: 3742413 • Letter: W
Question
wtclass.wtamu.edu Lessons-2018FA INTRONUMERICAL A https://www.mccormick Symbolic Summation- MATLAB & S Take Test: Homework 1-2018FA INT... Sum of array elements-MATLAB sum + My Grades Send Email Course Messages Tools Save and Submit > Click Submit to complete this assessment. Question 6 of 6 My Groups Question 6 2 points Save Answer MATH-4362-01 (CS117674) Read the following code v [4 62 5 9]; for i = 1:2:5 end Which one is the correct v after the for loop? Think it by yourself and then check it in MATLAB v [16 36 4 25 81]; v=[169525]; V [16 6 45 81]; [149 16 25]; Click Submit to complete this assessment. Question 6 of 6 Save and SubmitExplanation / Answer
Option A;
As in matlab indexing is starting from the 1
The colon operator, which allows you to specify a range of the form start:end
as
we can at index 1 and end at index 2 and starting at index 2 and stop at index 5
then we have
Then the answer is
v=[16, 36, 4, 25,81];
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.