📄 truckan.m
字号:
function [ret,x0] = truckan(t,x,u,flag,ts,sys,cb)% ts=PlotIncrement% TRUCKAN S-function for making truck animation.if flag==0, % asking for sizes of parameters and initial conditions truck0(sys,cb); ret = [0 1 0 3 0 0]; x0 = 0;elseif flag==2, % return the discrete states ret = 0;elseif flag==4, % returns the next time interval for a discrete update % Next update at a tenth of a second from now ret = t+ts; % previously +0.1else ret = [];endif (flag==2) & (abs(round(t/ts) - t/ts) < 1e-8), fig = gcf; if strcmp(get(fig,'Name'),'truck visualisation'), ud = get(fig,'UserData'); truckset(t,ud,u); endend% end truckan
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -