I have a range of values, x = 0:0.1:5 as my inputs.
I want to use
Eq.1 when 0 < x <= 1,
and
Eq.2 for 1 < x < 5.
and then plot(x,y)
if (x >= 0) && (x <= 1) y = x^(0.5) elseif (x > 1) y = x^(-0.5) end
arrayrange of values
if (x >= 0) && (x <= 1) y = x^(0.5) elseif (x > 1) y = x^(-0.5) end
Best Answer