凯发娱乐城

注册游戏账号

新葡京娱乐城

进入游戏大厅

博天堂娱乐城

真人棋牌游戏开户

您现在的位置:bbin官网 > 博彩资讯 > 正文

怎么样用Matlab演示简谐运动轨迹是正弦

来源:http://www.3388yule.net 作者:博彩资讯

真人棋牌游戏

博天堂

  怎么样用Matlab演示简谐运动轨迹是正弦怎么样用Matlab演示简谐运动轨迹是正弦% Demonstrate simple harmonic motion. % % Author: AdamTurner, 2021.04. % Copyright reserved. % Written in MATLAB R2018a. function SimpleHarmonicMotion(cmd0) persistent nShow nPeriod t dt tPeriod tShow x v m c k hFuncForce hFuncKinetic odeOption; persistent hFigure hAxes hTimer; if isempty(cmd0) cmd0 = Init; end % /* if isempty(cmd0) */ switch cmd0 case Init m = 1.000; c = 0.000; k = 10.000; hFuncForce = @(t) (0.000); hFuncKinetic = @(t, Y) ([Y(2); (hFuncForce(t) - c * Y(2) - k * Y(1)) / m]); dt = 0.001; tPeriod = 0.100; tShow = 5.000; nPeriod = round(tPeriod / dt) + 1; nShow = round(tShow / dt) + 1; t = zeros(nShow, 1); t(:) = NaN; x = t; v = t; t(end) = 0.000; x(end) = 1.000; v(end) = 0.000; odeOption = ... struct(AbsTol, 1.000e-4, ... RelTol, 1.000e-3); hFigure = ... figure(Name, Harmonic Motion, ... NumberTitle, off, ... Resize, off, ... Units, pixel, ... DeleteFcn, @DeleteFigure); hAxes = ... axes(hFigure, ... Box, on, ... NextPlot, add, ... Units, pixel, ... XLimMode, manual, XLim, [-1.000, tShow], ... YLimMode, manual, YLim, [-2.000, 2.000], ... XTickMode, manual, XTick, [], ... YTickMode, manual, YTick, [], ... XLabelMode, manual, XLabel, {}, ... YLabelMode, manual, YLabel, {}); hTimer = ... timer(BusyMode, drop, ... ExecutionMode, fixedRate, ... Period, tPeriod, ... TasksToExecute, Inf, ... TimerFcn, @RunHarmonicMotion); Render(); start(hTimer); otherwise error(Unknown command!); end % /* switch cmd0 */ %% ========== Function(s) ========== %% function DeleteFigure(source, event) stop(hTimer); delete(hTimer); delete(source); end % /* DeleteFigure */ function RunHarmonicMotion(source, event) tSpan = (t(end) : dt : (t(end) + tPeriod)).; Y0 = [x(end); v(end)]; [t1, Y1] = ... ode45(hFuncKinetic, tSpan, Y0, odeOption); t = [t((nPeriod) : (end - 1)); t1]; x = [x((nPeriod) : (end - 1)); Y1(:, 1)]; v = [v((nPeriod) : (end - 1)); Y1(:, 2)]; Render(); end % /* RunHarmonicMotion */ function Render() % Plot the spring. xySpring = ... [0.000, x(end); ... [[0.000; 0.250; -0.250; 0.250; -0.250; 0.250; -0.250; 0.250; -0.250; 0.000], ... x(end) + 0.200 + [0; 1; 3; 5; 7; 9; 11; 13; 15; 16] * 0.062500 * (1.600 - x(end))]; ... 0.000, 2.000]; hSpring = findobj(hAxes, Tag, Spring); if isempty(hSpring) hSpring = ... plot(hAxes, xySpring(:, 1), xySpring(:, 2), ... LineWidth, 1.500, LineStyle, -, Color, black, ... Tag, Spring); else hSpring.XData = xySpring(:, 1); hSpring.YData = xySpring(:, 2); end % /* if isempty(hSpring) */ % Plot the trajectory. hTrajectory = findobj(hAxes, Tag, Trajectory); if isempty(hTrajectory) hTrajectory = ... plot(hAxes, t(end) - t, x, ... LineWidth, 1.500, LineStyle, -, Color, blue, ... Tag, Trajectory); else hTrajectory.XData = t(end) - t; hTrajectory.YData = x; end % /* if isempty(hTrajectory) */ % Plot the vibrator. hVibrator = findobj(hAxes, Tag, Vibrator); if isempty(hVibrator) hVibrator = ... plot(hAxes, 0.000, x(end), ... LineStyle, none, ... Marker, o, MarkerSize, 16, MarkerFaceColor, white, MarkerEdgeColor, red, ... Tag, Vibrator); else hVibrator.YData = x(end); end % /* if isempty(hVibrator) */ drawnow limitrate; end % /* Render */ end % /* SimpleHarmonicMotion */ 怎么样用Matlab演示简谐运动轨迹是正弦
怎么样用Matlab演示简谐运动轨迹是正弦博彩百科bbin平台官网

  • 原文标题:怎么样用Matlab演示简谐运动轨迹是正弦
  • xpj

    9you娱乐城

    特别推荐

    
  • 澳门网上赌场
  • 澳门威尼斯人赌场官网
  • 老挝赌场
  • 区块链百家乐游戏
  • 搜索留痕方法
  • 赌球地址
  • 澳门太阳城网址
  • 全球最大博彩公司
  • 网上买球网站
  • bbin平台直营
  • 博彩公司
  • 加密货币交易所
  • 欧易为什么不清退
  • 中币跑路
  • 亚洲博彩公司
  • 澳门在线赌场
  • 菲律宾马尼拉赌场
  • 正规博彩平台
  • 大陆博彩平台
  • 澳门新葡京娱乐场
  • 世界赌场名单
  • 全讯导航网
  • 菠菜论坛
  • 东南亚赌博网站
  • 虚拟币博彩游戏
  • 澳门百家乐网址
  • 网上博彩导航
  • 数字币博彩网站
  • 马来西亚博彩公司
  • 越南赌场
  • 香港赌场
  • 澳大利亚赌博网站
  • 足球赔率
  • 菲律宾网上赌场
  • 加密货币赌博平台
  • 足球投注网站
  • 网络博彩论坛
  • 皇冠最新网址
  • 博彩公司排名
  • 推广引流方法
  • 推广话术
  • 数字币赌场
  • 皇冠现金网
  • 世界杯博彩公司
  • 英国博彩公司
  • 泰国在线赌场
  • 新加坡赌场
  • 比特币博彩公司
  • 洗钱平台
  • 泰达币赌场
  • 世界杯网上赌球
  • 博彩推广方式
  • 印度尼西亚博彩平台
  • 棋牌包网
  • bbin官网
  • 体育博彩公司
  • 越南赌博平台
  • 百家乐路单
  • 澳门博彩有限公司
  • 体育博彩公司排名
  • 百家乐网址
  • 世界杯赌球网站
  • 皇冠现金网
  • 怎么洗钱
  • 买球平台
  • 欧洲杯赌球平台
  • 皇冠博彩网址
  • 外围赌球网站
  • 果敢赌场
  • 赌球技巧
  • 电子游艺平台
  • 电子游戏机
  • 赌大小怎样赢钱
  • 体育投注平台
  • 合法网上赌场
  • 缅甸赌场网址
  • 欧洲杯赌球网站
  • 赌场如何赢钱
  • 买球地址
  • 真人牌九游戏
  • 时时彩技巧
  • 六合彩官方网站
  • 威尼斯人网上赌场
  • 外围赌球
  • 赌博网址
  • 彩票游戏群
  • 微信赌博群
  • 韩国网上赌场
  • 网上赌钱游戏
  • 美国在线赌场
  • 沙巴体育官网
  • 博彩平台推荐
  • 哈希娱乐
  • 比特币赌场
  • 世界赌场排名
  • 美国赌场攻略
  • 菠菜论坛
  • 买球网站
  • 缅甸果敢赌场
  • 支持人民币的博彩网站
  • 纽约网上赌场
  • 缅甸赌博网站
  • 柬埔寨网上赌场
  • 柬埔寨赌博网站
  • 韩国博彩公司
  • 支持人民币的博彩公司