Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
plot3我对MatLab中的函数有一个简短的问题。
plot3
假设我写了以下内容:
x = [1 1 -1 1]; y = [4 4 4 4]; z = [-1 1 1 -1]; plot3(x,y,z)
为什么 MatLab 然后绘制一个顶点在 (-1,4-1)、(1, 4, -1) 和 (1,4,1) 的三角形,而不是仅仅绘制点 (-1, 4, -1) , (1, 4, -1) 和 (1, 4, 1)?
plot和的默认线型plot3是一条线,而不仅仅是点。如果您只想绘制点,请使用不同的样式:
plot
plot3(x,y,z,'or'); #% plots red circles at each point