LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Nonlinear Curve fitting for Complex Data

I am trying to fit some rectangular complex data (S11 data for those with network analyzers) to a model using the Constrained Nonlinear Curve Fit vi in LabVIEW using the trust-region algorithm.  I'm already doing this in Matlab after I've gathered and saved all my data, but would like to bring it into LabVIEW.  (Doing the fitting in Matlab has helped me become more proficient in it, distributing and installing two run-times and the executables has become an unnecessary pain.)  However, the VI only accepts double, causing me to lose all of the phase information I need to do the extraction.  Is there any way to send CDB data or will I have to attempt to rewrite the VI and its sub-VIs, replacing DBL with CDB?

 

Thanks,

Chris

0 Kudos
Message 1 of 2
(2,803 Views)
Try to typecast the complex array to an array of DBL for the Y input and do the same inside the model. This will give you an array of twice the size, containing the RE and IM values interlaced.
0 Kudos
Message 2 of 2
(2,790 Views)