any input function to transfer functionm

5 ビュー (過去 30 日間)
John Krzykacz
John Krzykacz 2019 年 3 月 12 日
コメント済み: Aquatris 2019 年 3 月 13 日
In Matlab ezxamples the input to transfer functions are definite i.e. defined mathematically.
I need to enter to a transfer function my own a function/array created in my Matlab code. It is a random array, without any analytical /mathematical expression.
Can I use this array as an input to a transfer function? (I suspect Matlab should calculete its Laplace transform "on line").
Thanks- bj

回答 (1 件)

Aquatris 2019 年 3 月 13 日
I think the function you are looking for is lsim().
The usage is pretty simple.
t = 0:1e-3:10; % time vector
u = rand(length(t),1);% random inputs
sys = tf(100,[1 2*0.1*10 100]); % transfer function
[y,t] = lsim(sys,u,t);
  2 件のコメント
Aquatris 2019 年 3 月 13 日
I can't help much more with the limited information. However, I can suggest converting the transfer function in to state space form and writing your own solver using Euler integration or Runge-Kutta. This way you can calculate the input however you want.


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by