|
|
发表于 2004-5-20 16:10:34
|
显示全部楼层
求教:矩阵计算的问题?急!
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..
|
|