examp18.m
来自「ADSP TOOLBOX: Version 2.0 and gui m-file」· M 代码 · 共 11 行
M
11 行
clc,echo on
%EXAMPLE 18
tr = 0:0.05:6;t=tr; % Time array
IC = [1; 2]; % Initial condition array
RHS=[1 2]; LHS=[1 4 3]; % Coefficient arrays of LHS and RHS
X='sin(10*t).*(t>=0 & t<=pi)'; % Input as string variable
y=ctsim(RHS,LHS,X,tr,IC,'rk2'); % Response using 2nd order RK
plot(t,eval(X),tr,y) % Plot result
echo off %end of example
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?