Q:

Assume that the function dif does not exist. Write your own expression(s) to accomplish the same thing for a vector

0

Assume that the function dif does not exist. Write your own expression(s) to accomplish the same thing for a vector.

All Answers

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

>> vec = [5 11 2 33 -4]

vec =

 5 11 2 33 -4

>> v1 = vec(2:end);

>> v2 = vec(1:end-1);

>> v1-v2

ans =

 6 -9 31 -37

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