有趣的MATLAB动画演示程序汇总知识.pdf
2022-02-06 10:04:19 47KB 网络文档
clear all close all clc % straight line 1 of the athletic track x1=-10:0.2:10; y1=0*x1+5; % semi-circle 1 of the athletic track theta=pi/2:-0.04:-pi/2; x2=5*cos(theta)+10; y2=5*sin(theta); % straight line 2 of the athletic track x3=10:-0.2:-10; y3=0*x3-5; % semi-circle 2 of the athletic track theta=3*pi/2:-0.04:pi/2; x4=5*cos(theta)-10; y4=5*sin(theta); % Include straight lines and semi-circles to get an entire athletic track x=[x1 x2 x3 x4]; y=[y1 y2 y3 y4]; % Two cycles of the athletic track x=[x x]; y=[y y]; % plot the athletic track plot(x,y) axis([-16,16,-6,6]) axis equal hold on for i=1:length(x) k1=fix(1.1*i); % define velocity of the 1st player (uniform velocity) if k1>length(x) k1=length(x); end h1=plot(x(k1),y(k1),'Color',[1 0 0],'Marker','o','LineWidth',5); % show location of the 1st player k2=fix(1+5*i^(0.76)); % define velocity of the 2nd player (faster at the beginning, then slower) if k2>length(x) k2=length(x); end h2=plot(x(k2),y(k2),'Color',[k2/length(x) 0 k2/length(x)],'Marker','s','LineWidth',5); % show location of the 2nd player
2022-01-02 09:03:33 3KB MATLAB 动画制作 龟兔赛跑 追逐游戏
MATLAB动画图作动态图.doc
2021-11-29 09:02:37 466KB
有趣的MATLAB动画演示程序汇总.doc
2021-11-01 17:03:52 115KB matlab学习资料 matlab 数学建模
1
matlab实现动画的五种方法总结,供大家相互交流学习总结。
2021-06-21 11:43:49 4KB matlab 动画 五种方法总结
1
MATLAB动图的一种简单实现方法
2021-03-04 19:02:12 224B MATLAB 动画
1
MATLAB动画演示程序汇总-MATLAB 动画演示程序汇总.rar MATLAB 动画演示程序汇总:lol :lol :lol MATLAB 动画演示程序汇总.rar
2020-01-18 03:32:19 253KB matlab
1
MATLAB动画——木块在水中收到浮力上下摆动的物理过程 老师上课的作业,二维动画,有木块的速度曲线和加速度曲线
1
MATLAB生成gif的小程序,解决MATLAB不能生成gif图片的缺点
2019-12-21 20:06:46 259KB matlab 动画
1