‎09-03-2008 02:06 AM
Hi!
I have following Matlab-code that works fine with Matlab, but when I try to use it with Mathscript node, it won't work properly. The inputs r, th and Z are 2D-arrays. The problem seems to be that "hold on" function won't work and when I try to display the contour within a polar axes, I get error: "-90052 occurred at Error in function polar at line 9. You specified an invalid number of output parameters for this function". I'm just a novice at LabView and I appreciate if You can help me a bit.
[X,Y] = pol2cart(th*3.14159/180,r);
[XI,YI] = meshgrid(-1:0.01:1,-1:.01:1);
ZI = griddata(X,Y,Z,XI,YI,'cubic');
surf(XI,YI,ZI)
hold on
surf(X,Y,zeros(size(X)))
hold off
axis equal
h = polar([0 2*pi], [0 1]);
delete(h)
hold on
contourf(XI,YI,ZI,20)
Sincerely
Quizma
‎09-03-2008 02:48 AM
‎09-03-2008 03:41 AM
LabView verison is 8.5.1
‎09-03-2008 03:49 AM
‎09-03-2008 11:50 AM