x=[1,2,3,4,5,6,7,8,1,2,3,4,5,6,7,8],y=[1,2,3,4,5,6,7,8,1,2,3,4,5,6,7,8] 怎么用matlab输出轨迹图? 10
要求:每个坐标值都被标记,比如plot(x,y,'*')1、但是重复多次出现的坐标值的能否使其标记变大;...
要求:每个坐标值都被标记,比如plot(x,y,'*')
1、但是重复多次出现的坐标值的能否使其标记变大; 展开
1、但是重复多次出现的坐标值的能否使其标记变大; 展开
2个回答
展开全部
类似于分岔图,不断比较
Y(2,:)=Y(1,:)-Y(2,:);
for k=2:length(Y)
f=k-1;
if Y(2,k)<0
if Y(2,f)>0
x=Y(1,k)-Y(2,k)*(Y(1,f)-Y(1,k))/(Y(2,f)-Y(2,k));
Z=[Z r+abs(x)*1i];
end
else
if Y(2,f)<0
x=Y(1,k)-Y(2,k)*(Y(1,f)-Y(1,k))/(Y(2,f)-Y(2,k));
Z=[Z r+abs(x)*1i];
end
end
end
end
plot(Z,'k.','markersize',0.5);
Y(2,:)=Y(1,:)-Y(2,:);
for k=2:length(Y)
f=k-1;
if Y(2,k)<0
if Y(2,f)>0
x=Y(1,k)-Y(2,k)*(Y(1,f)-Y(1,k))/(Y(2,f)-Y(2,k));
Z=[Z r+abs(x)*1i];
end
else
if Y(2,f)<0
x=Y(1,k)-Y(2,k)*(Y(1,f)-Y(1,k))/(Y(2,f)-Y(2,k));
Z=[Z r+abs(x)*1i];
end
end
end
end
plot(Z,'k.','markersize',0.5);
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询