Question: Colon operator vs. linspace, mod, rem. Do the following. create a row vector with linearly spaced values with starting value of-k final value of k,

Colon operator vs. linspace, mod, rem. Do the following. create a row vector with linearly spaced values with starting value of-k final value of k, and the increment size of +0.2. Assign the created vector as variable vec. The value of k will be randomized at each submission, and will be created by the auto grader. Do not modify the given value of k. o .Find the remainder after division of vec by 3, using mod function. Assign the result as Find the remainder after division of vec by 3, using rem function. Assign the result as for you to compare the different between mod and rem. o Note: k will be a positive real number. variable mod vec. variable rem vec . Look at the plot generated What do you observe? You will not be graded on this answer, but try to figure this out for the learning purpose. Note that sometimes there are numerical errors when the remainder is around 0 or 2.99999. Hint: Consider the choice between using colon operator and linspace. Which one is the appropriate (easier to use) one here
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
