I'm trying to plot a function on matlab that's defined such that: Y=-100t ; 0>=t>=0.15 Y=-15 ; t>.15
I'm using the following code:
function [ Y ] = Gain( t )
for t=[0:0.01:0.15]
Y=-100*t
end
for t=0.15:0.01:2
Y=-15
end
plot (Gain)
but I'm going into an infinite loop!
Would someone please solve this problem for me.
Thank you.
ta parameter?Y=[-100.*(0:0.01:0.15) -15+0.*(0.15:0.01:2)]; plot(Y).