car_fb.m
来自「Matlab学习课件」· M 代码 · 共 23 行
M
23 行
function car_fb
%Task to do feedback control of carriage
procglbl % Read in global definitions
if Scar_fb == 0
% Initialization section - occurs once only
Scar_fb = 1; % Make sure this section is not executed again!
% No initialization for this task
return;
end
if tstep < Tcar_fb_next
return;
end
Tcar_fb_next = Tcar_fb_next + Tcar_fb; % Time for next run
% Always does the feedback algorithm -- no state structure
error = Xset_car - x_car;
v_car = Kp_car * error;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?