0
Answered

meshgrid and ndgrid support

Varun Shankar 11 year бұрын updated by Pavel Holoborodko 11 year бұрын 2

Does the MCT support meshgrid and/or ndgrid in multiprecision? I've been using these in my programs with the mp type, but I wanted to check anyway.

Yes, they are both supported. 


[X,Y] = meshgrid(mp(-2):mp(.2):mp(2), mp(-2):mp(.2):mp(2));

Z = X .* exp(-X.^2 - Y.^2);

surf(double(X),double(Y),double(Z))


However these functions are usually used for visualization and mp-arrays they produce should be converted to double for plotting (like above in surf function).