Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

hi, I’m developing a program in c# which uses the NI 9233 for acquire my signal but I can´t process my data

hi, I’m developing a program in c# which uses the NI 9233 for acquire my signal, after that with the two arrays from my data acquisition, I try to use the CurveFit method, right now I have my two arrays fully populated and this line code:

fittedArray=CurveFit.PolynomialFit(xArray,dataArray,nOrder,PolynomialFitAlgorithm.Svd);

 

And my catch message is:

 

The type initializer for ‘NationalInstruments.Analisys.Math.CurveFit’ threw an exception  

0 Kudos
Message 1 of 2
(2,876 Views)
Choque,

Thanks for contacting National Instruments! 

What exception are you getting?  I took the liberty of throwing together a quick example for you in C# in which I calculate a Polynomial Fit and then plot it on a graph.  I think that if you take a look at how I've done it in this quick example you should be able to tailor it to fit your application.  Note that this example was developed with Visual Studio 2005.  Let me know if this helps!


Derrick S.
Product Manager
NI DIAdem
National Instruments
0 Kudos
Message 2 of 2
(2,857 Views)