matlab中的曲线
只是想知道matlab是否有绘制曲线而不是直线的函数。先感谢您。
Just wanted to know if matlab had a function to plot curves instead of lines. Thank you in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
不,一点也不。只需使用连线绘制一组许多点即可。使用足够的点来获得您想要的精度。无论如何,如果您使用足够精细的点集,您可以绘制的任何曲线都可以通过这种分段线性图很好地表示。
如果您拥有的只是一组点,则可以使用样条曲线对它们进行平滑插值,以获得漂亮的平滑曲线。 Spline、interp1、pchip 或 splines 工具箱将帮助您完成此任务。
No. Not at all. Just plot a set of many points, using connect-the-dots. Use enough points to get the accuracy you want. Any curve that you can plot will be well represented by such a piecewise linear plot anyway, if you use a fine enough set of points.
If all that you have are a set of points, then use a spline to interpolate them smoothly to get a nice smooth looking curve. Spline, interp1, pchip, or the splines toolbox will help you in this task.
使用样条线插值然后绘制结果的示例:
屏幕截图 http: //www.freeimagehosting.net/uploads/2180c0813b.png
An example of using
spline
to interpolate then plot the result:screenshot http://www.freeimagehosting.net/uploads/2180c0813b.png
是的,MATLAB 证明了一套“简单”(=“ez”) 绘图函数。例如:
ezplot:
和 ezsurf:
请参阅 http://www.mathworks.com/ help/techdoc/ref/ezplot.html 了解更多信息
Yes, MATLAB proves a suite of "easy" (= "ez") plotting functions. For example:
ezplot:
and ezsurf:
See http://www.mathworks.com/help/techdoc/ref/ezplot.html for more information
用Matlab进行曲线拟合
http://www.swarthmore.edu/NatSci/echeeve1/Ref/ MatlabCurveFit/MatlabCftool.html
Curve Fitting with Matlab
http://www.swarthmore.edu/NatSci/echeeve1/Ref/MatlabCurveFit/MatlabCftool.html
如果您正在寻找类似 splines 的东西,那么可以,只需使用
样条函数
If you are looking for something like splines then yes, just use the
spline
function您是否尝试过曲线拟合工具箱?
Have you tried the Curve Fitting Toolbox?