为什么我的matlab程序出不了图,但是数据输出是对的 10
clearx_t=28;x_0=0;y_0=0;y_n=0;y_t=0;forx_n=0:100R_ref=sqrt((x_0-x_t)^2+(y_0-y_t)^2);R...
clear
x_t=28;
x_0=0;
y_0=0;
y_n=0;
y_t=0;
for x_n=0:100
R_ref=sqrt((x_0-x_t)^2+(y_0-y_t)^2);
R_n=sqrt((x_n-x_t)^2+(y_n-y_t)^2);
d=R_n-R_ref;
end
plot(x_n,d)
grid on
axis([0,100,-30,50])
xlabel('x axis'), ylabel('Distance difference(cm)')
title('2D distance difference diagram')
hold off 展开
x_t=28;
x_0=0;
y_0=0;
y_n=0;
y_t=0;
for x_n=0:100
R_ref=sqrt((x_0-x_t)^2+(y_0-y_t)^2);
R_n=sqrt((x_n-x_t)^2+(y_n-y_t)^2);
d=R_n-R_ref;
end
plot(x_n,d)
grid on
axis([0,100,-30,50])
xlabel('x axis'), ylabel('Distance difference(cm)')
title('2D distance difference diagram')
hold off 展开
展开全部
clear
x_t=28;
x_0=0;
y_0=0;
y_t=0;
x_n=0:100;
y_n=x_n;
R_ref=sqrt((x_0-x_t).^2+(y_0-y_t).^2);
R_n=sqrt((x_n-x_t).^2+(y_n-y_t).^2);
d=R_n-R_ref;
plot(x_n,d)
grid on
axis([0,100,-30,50])
xlabel('x axis'), ylabel('Distance difference(cm)')
title('2D distance difference diagram')
按上面语句试试
x_t=28;
x_0=0;
y_0=0;
y_t=0;
x_n=0:100;
y_n=x_n;
R_ref=sqrt((x_0-x_t).^2+(y_0-y_t).^2);
R_n=sqrt((x_n-x_t).^2+(y_n-y_t).^2);
d=R_n-R_ref;
plot(x_n,d)
grid on
axis([0,100,-30,50])
xlabel('x axis'), ylabel('Distance difference(cm)')
title('2D distance difference diagram')
按上面语句试试
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
clear
x_t=28;
x_0=0;
y_0=0;
y_n=0;
y_t=0;
for x_n=0:100
R_ref=sqrt((x_0-x_t)^2+(y_0-y_t)^2);
R_n=sqrt((x_n-x_t)^2+(y_n-y_t)^2);
d(x_n+1)=R_n-R_ref;
end
plot(0:100,d)
grid on
axis([0,100,-30,50])
xlabel('x axis'), ylabel('Distance difference(cm)')
title('2D distance difference diagram')
hold off
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询