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:

  • x if x equal or less 10
  • x^2 if x greater 10 , equal or less 20
  • square root of x if x greater 20 , equal or less 40
  • x^3 if x greater 40

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -