Develop a vectorized version of the following code:
tstart=0; tend=20; ni=5;
t(1)=tstart;
y(1)=10 + 5*cos(2*pi*t(1)/(tend-tstart));
for i=2:ni+1
t(i)=t(i-1)+(tend-tstart)/ni;
y(i)=10 + 5*cos(2*pi*t(i)/ ...
(tend-tstart));
end
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.