I am new to GNU Octave and I want to plot the function psi
in the range of [0 : 2000]
:
function y = H(x)
if (x > 0)
y = 1
else
y = 0
endif
endfunction
function y = psi(s)
t = 200
phiabs = 500
K = 1000
n0 = 1000
y = -n0 * e .^ (-(s - phiabs) / t) * H(s - phiabs) - K * H(s) * H(phiabs - s)
endfunction
How to do that?