如何画2D斜坐标系的线图?

5 次查看(过去 30 天)
xd
xd 2024-6-2
回答: halleyhit 2024-6-19
请教,如何画2D斜坐标系的线图?

回答(1 个)

halleyhit
halleyhit 2024-6-19
酱紫?
i=sqrt(-1);
x_v=1;
y_v=(1+i)/sqrt(2);%定义y轴的方向
x=1:10;
y=1:10;
data=x*x_v+y*y_v;%把原来的数据x-y变到新坐标系
x=0:10;
y=zeros(1,11);
xaxes=x*x_v+y*y_v;%把原来的x轴变到新坐标系
x=zeros(1,11);
y=0:10;
yaxes=x*x_v+y*y_v;%把原来的y轴变到新坐标系
plot(real(data),imag(data),'blue')
hold on
plot(real(xaxes),imag(xaxes),'red')
plot(real(yaxes),imag(yaxes),'red')
hold off

类别

Help CenterFile Exchange 中查找有关 Get Started with Phased Array System Toolbox 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!