0

I'm trying to plot this function with gnuplot

enter image description here

but when I try to do it a find this Warning: empty y range [1:1], adjusting to [0.99:1.01]. I think that it should be a precision problem. I can plot it perfectly in another programs, but I would like to know why I can not plot it with gnuplot and how to fix it

Edit:

The command that I'm using is

f(x)=(1-(sinh(1/x))**(-4))**(1/8)

plot [0.01:1.131] f(x)

2
  • Please show the command you used in gnuplot. Also show what x range you tried to plot - note that sinh(1/x) blows up for x near zero. Commented May 20, 2021 at 22:33
  • I have edited the question with this information Commented May 20, 2021 at 22:36

1 Answer 1

2

Two things:

  1. That equation as written does not match the one you showed. Is the exponent supposed to be 4 or -4?
  2. Gnuplot uses integer arithmetic, so (1/8) evaluates to 0. Use either (1./8.) or (.125)

Possible correction (depending on what is the correct exponent):

f(x) = (1. - (sinh(1/x)**(-4)))**(1./8.)
set xrange [0.01 : 1.131]
plot f(x)

enter image description here

Sign up to request clarification or add additional context in comments.

1 Comment

You are right, I put -4 in the exponent. I already change it. The answer to my problem is that gnuplot use integer arithmetic, like you said. Thank you

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.