Interval graph plotting in gnuplot -
i have equation goes this
f(x) = x*10 ; 0 < x <= 10 = x*x + x*10 ; 10 < x < 20 how plot f(x) in 1 graph using gnuplot?
plot [0:20] x <= 10 ? x*10 : x*x + x*10 update: if have more 2 functions, can use approach:
f(x) = x <= 10 ? x \ : x <= 20 ? x**2 \ : x <= 40 ? sqrt(x) \ : x**3 and afterwards,
plot [0:40] f(x) to clarify, value f(x) be:
xifxequal or less 10x^2ifxgreater 10 , equal or less 20- square root of
xifxgreater 20 , equal or less 40 x^3ifxgreater 40
Comments
Post a Comment