09-10-2007 08:29 AM
09-10-2007 10:50 AM
I currently don't have matlab installed, but your code works fine in mathscript (LabVIEW 8.2).
Even plain LabVIEW should not have any problems with graphind the 3D surface, as you could see in my ealier example. The only problem was with fitting because of duplicate Z values. Since the Z values are (seemingly) now unique, maybe the fitting will work too. have you tried?
09-10-2007 01:04 PM
09-11-2007 06:01 AM
Hi altenbach,
I have checked again. Tried increasing the precision of values in all arrays up to 8 digits, however, I guess I am only changing the viewing resolution. Does the code calculate the polynomials with a similar resolution?
Also, if you compare the surface obtained by the LabView code with that of Matlab, it is quite clear that there is some error, and the X-Y pair does not have duplicate Z values . I am attaching screen shots of the two surfaces obtained in Matlab.
Hope this helps in ascertaining the root of the problem.
Thanks,
ViHAR.
09-11-2007 11:19 AM - edited 09-11-2007 11:19 AM
I am not familiar with the guts of the griddata function, but I think it is safe to assume that it does NOT fit to polynomials, but just does some local triangulation. Not sure about that, though.
Unfortunately, your data in the m file has a weird mix of spaces and tabs as seperators, but once it is cleaned up, it seems to fit quite well with a 3rd or 4th order polynomial using my old code.
See attached. There are a few outliers (e.g. phi~30) but you could change the axes for a tighter range
Message Edited by altenbach on 09-11-2007 09:20 AM
09-12-2007 08:01 AM
09-12-2007 08:36 AM
09-12-2007 10:22 AM
09-12-2007 11:03 AM
09-12-2007 11:30 AM