开发者

How to plot this equation

开发者 https://www.devze.com 2023-02-05 07:01 出处:网络
Please help me how to pl开发者_运维问答ot this equation x2 = x1 + 2.5*cos(230*t) by adjusting t as t = 0:0.0001:.01.Assuming you want a single line 2D plot and x1 is fixed, try

Please help me how to pl开发者_运维问答ot this equation x2 = x1 + 2.5*cos(230*t) by adjusting t as t = 0:0.0001:.01.


Assuming you want a single line 2D plot and x1 is fixed, try

x1 = <put your number here>
t = 0:0.0001:.01
x2 = x1 + 2.5*cos(230*t)
plot(t, x2)

If you want something fancier like different formatting or a 3D plot, I highly recommend at least skimming through the manual. For surface or mesh plotting, you'll want to look at mesh, surface, and probably meshgrid. Matlab's rich support for plotting is one of its big selling points.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号