How do I input a signal which is not a standard signal (like step or ramp) to a transfer function?

1 view (last 30 days)
How do I input a signal which is not a standard signal (like step or ramp) to a transfer function? My signal is an error signal from a comparator & I am using a for loop in my program.
for j=1:(t1*100)
xc(j+1,1)=current(j+1,1)*pos_lim/i_lim;
xe(j+1,1)=xc(j+1,1)-xv(j,1);
% transfer function
% output=xe(j+1,1)*transfer function
end

Answers (1)

Azzi Abdelmalek
Azzi Abdelmalek on 8 Jul 2015
%Example
H=tf(1,[1 2])
time=0:0.1:10
input_s=rand(1,numel(time));
output_s=lsim(H,input_s,time)
plot(time,output_s)

Community Treasure Hunt

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

Start Hunting!