Formula to show square root between 2 values

197 Views Asked by At

Bear with me - it's been a while since I did this at school!

I need to plot a curve in the form of a square root (kind of an 'r' shape if you will)

I have 6 intervals along my x axis, and my maximum y value can be 180. Given a value of x, how can I work out my value of y?

Many thanks

1

There are 1 best solutions below

6
On BEST ANSWER

If I understand well your question, you want a function that returns a 'r' like shape between $0$ and $x_{max}$ and in a range from $0$ to $y_{max}$.

To do so you can just use: $$y(x) = \frac{\sqrt{x}}{\sqrt{x_{max}}}*y_{max}$$

Here your $y_{max}=180$ so you can use: $$y(x) = \frac{\sqrt{x}}{\sqrt{x_{max}}}*180$$

This should give you the shape you expect.

Here (see comments) are the plots for different functions shaped like you asked.