Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I just get to a solution by myself... My problem was the impossibility to plot because of numerical errors that turns my (expected) real values into complex numbers with an imaginary part extremely small.

I used the fantastic function "list_plot3d". For example:

var ('x y')
f = sqrt(1+x+y)
list = []
for n in [-2.0,-1.9..,2.]:
    for m in [-2.0,-1.9..,2.]:
        list.append((n,m,real(f(x=n,y=m))))
show(list_plot3d(list))

It's not difficult to modify the above code if one wants to really ignore complex numbers while plotting (that is indeed what Matlab automatically does).