2013-10-24 37 views
0

下面的代码绘制断开的矢量,而它们应该彼此接触。这是一个错误还是我错过了什么?Matlab函数颤动3 - 矢量断开

quiver3(0,0,0,50,50,50); 
text(30,30,30,' \leftarrow Views and Eq. returns','FontSize',11, 'FontWeight','bold', 'FontName', 'Palatino Linotype') 
hold on 
quiver3(0,0,0, 50, 50, 0); 
text(30,30,0,' \leftarrow Expected returns (projection/unknows)','FontSize',11, 'FontWeight','bold', 'FontName', 'Palatino Linotype') 
quiver3(50,50,0, 0, 0, 50); 

grid on 

回答

1

我在R2013a中得到了同样的结果。尝试尺度参数,即,任选的第七个参数,设置为等于一个:

figure; 
quiver3(0,0,0, 50,50,50, 1); 
text(30,30,30,' \leftarrow Views and Eq. returns','FontSize',11, 'FontWeight','bold', 'FontName', 'Palatino Linotype') 
hold on 
quiver3(0,0,0, 50,50,0, 1); 
text(30,30,0,' \leftarrow Expected returns (projection/unknows)','FontSize',11, 'FontWeight','bold', 'FontName', 'Palatino Linotype') 
quiver3(50,50,0, 0,0,50, 1); 
grid on 

按照documentation一些为自动缩放的可被使用。不知道为什么默认不是一个。您还可以尝试通过使用零值的缩放值来禁用缩放 - 这可能对您的应用程序类型更安全。

+0

谢谢你,horchler!加1工作。我的matlab版本是R2011a – user1700890