Using the colon operator and also the linspace function, create the following row vectors:
belongs to book: MATLAB: A Practical Introduction to Programming and Problem Solving|Stormy Attaway|Fourth Edition| Chapter number:2| Question number:8.2
All Answers
total answers (1)
>> -5:-1
ans =
-5 -4 -3 -2 -1
>> linspace(-5,-1,5)
ans =
-5 -4 -3 -2 -1
>> 5:2:9
ans =
5 7 9
>> linspace(5,9,3)
ans =
5 7 9
>> 8:-2:4
ans =
8 6 4
>> linspace(8,4,3)
ans =
8 6 4
need an explanation for this answer? contact us directly to get an explanation for this answer