Try this:
tt=0:0.25:2*pi;
aa=size(tt);
L=zeros(aa)
k=1;
for t=0:0.25:2*pi
A=[sin(t),0,0];
B=[0,0,1];
L(k)=sqrt(sum((A-B).^2))
k=k+1;
end
plot(tt,L,'r','MarkerSize',10)
xlabel('the valve of time t ')
ylabel('the valve of function ')
为什么运行不出来?
tt=0:0.25:2*pi;
aa=size(tt);
L=zeros(aa)
k=1;
for t=0:0.25:2*pi
A=[sin(t),0,0];
B=[0,0,1];
请教 ylgdiy 。
L(k)=sqrt(sum((A-B).^2))
k=k+1;
end
plot(tt,L,'r','MarkerSize',10)
xlabel('the valve of time t ')
ylabel('the valve of function ')
总是出现:
|
Error: Missing operator, comma, or semicolon.
tt=0:0.25:2*pi;
aa=size(tt);
L=zeros(aa)
k=1;
for t=0:0.25:2*pi
A=[sin(t),0,0];
B=[0,0,1];
L(k)=sqrt(sum((A-B).^2))
k=k+1;
end
plot(tt,L,'r','MarkerSize',10)
xlabel('the valve of time t ')
ylabel('the valve of function ')
I have try this procdure many times, there is no problem!!!!!!
In this procdure, I used the symbol ";", So the sequence is not displayed..