Answers for "matlab for loop matrix"

1

matlab for loop matrix

m=zeros(1,length(t)); %array of zeros

for i=1:length(t) %filling peicewise function
if(t(i)>=0 && t(i)<0.1)
m(i)=10*t(i);
else
m(i)=0;
end
end % for
Posted by: Guest on May-05-2021

Browse Popular Code Answers by Language