0
Beantwoord

meshgrid and ndgrid support

Varun Shankar 11 jaar geleden bijgewerkt door Pavel Holoborodko 11 jaar geleden 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). 




That's great, thank you.