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) =  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(g(x)),x,aspect_ratio=1, show=true)                                
readline()
```





On Monday, May 23, 2016 at 2:01:05 PM UTC-4, Henri Girard wrote:
>
> 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 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) = -sqrt(4-x^2)
>> h(x) = sqrt(-x^2+2*x)
>> k(x) = -sqrt(-x^2-2*x)
>> plot([g,f,h,k],-2,2,aspect_ratio=1)
>>
>
>

Reply via email to