Q:

Write a relational expression for a vector variable that will verify that the last value in a vector created by cumsum is the same as the result returned by sum

0

 Write a relational expression for a vector variable that will verify that the last value in a vector created by cumsum is the same as the result returned by sum.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

>> vec = 2:3:17

vec =

 2 5 8 11 14 17

>> cv = cumsum(vec)

cv =

 2 7 15 26 40 57

>> sum(vec) == cv(end)

ans =

 1

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now