MATLAB 动画仿真

MATLAB 动画仿真


1 利用MATLAB进行图形处理

  matlab调用画图plot函数族,返回该函数的句柄,通过句柄可以修改图形的属性。
t = 0:20;
plot_handle = plot(t, sin(t));

这里写图片描述

// 修改图形属性
set(plot_handle, 'YData', cos(t));

这里写图片描述

plot_handle1 = plot(t,sin(t));
hold on;
plot_handle2 = plot(t, cos(t));
set(plot_handle2,'YData', cos(2*t));
总结:fill命令来模拟倒立摆

查看plot函数的属性:
get(plot_handle)
AlignVertexCenters: ‘off’
Annotation: [1x1 matlab.graphics.eventdata.Annotation]
BeingDeleted: ‘off’
BusyAction: ‘queue’
ButtonDownFcn: ”
Children: []
Clipping: ‘on’
Color: [0 0.4470 0.7410]
CreateFcn: ”
DeleteFcn: ”
DisplayName: ”
HandleVisibility: ‘on’
HitTest: ‘on’
Interruptible: ‘on’
LineStyle: ‘-’
LineWidth: 0.5000
Marker: ‘none’
MarkerEdgeColor: ‘auto’
MarkerFaceColor: ‘none’
MarkerSize: 6
Parent: [1x1 Axes]
PickableParts: ‘visible’
Selected: ‘off’
SelectionHighlight: ‘on’
Tag: ”
Type: ‘line’
UIContextMenu: []
UserData: []
Visible: ‘on’
XData: [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20]
XDataMode: ‘manual’
XDataSource: ”
YData: [1x21 double]
YDataSource: ”
ZData: [1x0 double]
ZDataSource: ”


2 动画举例:倒立摆

对于倒立摆的数学建模参考建模方程
这里写图片描述
倒立摆的四个角:

(y+w/2,g),(y+w/2,g+h),(yw/2,g+h)(yw
  • 6
    点赞
  • 22
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值