Use MATLAB to determine how many elements are in the array s
Use MATLAB to determine how many elements are in the array sin (-pi/2):0.05: cos (0). Use MATLAB to determine the 10th element. number of elements in y: number = the 10thd element in array y: y(10) =
Solution
>> y = sin(-pi/2):0.05:cos(0);
>> length(y)
ans =
41
>> y(10)
ans =
-0.5500
