5th semester files
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
%*************************************************************
|
||||
% Function to generate ramp
|
||||
% Input : time interval, signal advance/delay factor
|
||||
% Output: Ramp response
|
||||
%**************************************************************
|
||||
function y = ramp(t,ad)
|
||||
% generation of unit step
|
||||
% t: time
|
||||
% ad : advance (positive), delay (negative)
|
||||
N= length(t);
|
||||
y = zeros(1,N);
|
||||
for i = 1:N,
|
||||
if t(i) >= -ad,
|
||||
y(i) = t(i);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user