当前位置: 动力学知识库 > 问答 > 编程问答 >

Plot a line in MATLAB

问题描述:

I'm trying to plot the projected line between two data class. Is there alternative solution to Plot a line instead of using quiver?, could you assist me with that?

Thanks in advance.

w =[20.4327 -27.3558]'

auxw= w/norm(w);

quiver(0,0,auxw(1),auxw(2))

网友答案:

To plot a line use plot, since you want to plot a line from [0 0] to auxw do:

plot([0 auxw(1)], [0 auxw(2)])
分享给朋友:
您可能感兴趣的文章:
随机阅读: