Thanks, I use IJulia I delete it
Le 24/05/2016 00:33, Andre Bieler a écrit :
delete the readline if you run this in a notebook or in the julia REPL. leave
it if you run it as a script.
delete the readline if you run this in a notebook or in the julia REPL. leave
it if you run it as a script.
I delete readline ?
Because plot doesn't dislay
Thanks
Henri
Le 23/05/2016 20:41, Andre Bieler a écrit :
Oh now I see... Neat.
But you then need to have different ranges for the x variable.
using Plots
x = linspace(-2, 2, 100)
xh = linspace(0, 2, 50)
xk = linspace(-2, 0, 50)
f =
Oh now I see... Neat.
But you then need to have different ranges for the x variable.
using Plots
x = linspace(-2, 2, 100)
xh = linspace(0, 2, 50)
xk = linspace(-2, 0, 50)
f = sqrt(complex(4 .- x.^2))
g = -sqrt(complex(4 .- x.^2))
h = sqrt(complex(-xh.^2 .+ 2 * xh))
k = -sqrt(complex(-xk.^2
Thats what I want yin/yang, can't I get rid of the line on zéro ?
Thanks your model works.
using Plots
x=linspace(-2,2,100)
f(x) = sqrt(complex(4.-x.^2))
g(x) = -sqrt(complex(4.-x.^2))
h(x) = sqrt(complex(-x.^2.+2*x))
k(x) = -sqrt(complex(-x.^2.-2*x))
plot([real(f(x)),real(h(x)),
Not exactly sure what you want to do.
But you take the square root of negative numbers, which
then is a complex number. I dont think you can give plot a complex number
to plot?
The following code works, maybe you can work your way from there...
```julia
using Plots
x=linspace(-2,2,100)
f(x) =
Always the same problem f and g works but h and after give this error.
I notice if I change x -4,4 I have got the same error
Le 23/05/2016 19:02, Eric Forgy a écrit :
Try x.^2.
On Tuesday, May 24, 2016 at 12:48:49 AM UTC+8, Henri Girard wrote:
Hi,
I don't know why this plot doesn't
Try x.^2.
On Tuesday, May 24, 2016 at 12:48:49 AM UTC+8, Henri Girard wrote:
>
> Hi,
> I don't know why this plot doesn't work ?
> It tells me the domain is wrong ?
> I don't understand why ?
> Any help ?
> Regards
> Henri
>
>
> using Plots
> x=linspace(-2,2)
> f(x) = sqrt(4-x^2)
> g(x) =