PDA

View Full Version : C & imsl & pvwave



nbo10
08-13-2007, 06:54 AM
Hi,
I have a c program that uses the imsl libraries to do some nonlinear data fitting. See post here (http://forums.vni.com/showthread.php?t=969). Currently I'm saving the data to a text file and then importing it to originlab or mathematica to graph the data, no need to say that this is a real big pain in the ***. Is there a way I can either call pvwave from a c program or call the imsl libraries from a pvwave program?

I have basic wave files that will read in data and then make a 2D graph but I haven't done anything more than that with pvwave.

Thanks

rwagner
08-13-2007, 10:23 AM
Hi,

You can do both (Call PV-WAVE from C or call C programs from PV-WAVE).

However, I would advise you first to look at the NLINLSQ Function in PV-WAVE Extreme Advantage. PV-WAVE Extreme Advantage wraps all of the IMSL Math and Stat libraries, so you can write your whole program in PV-WAVE. It may be simpler than writing it in C. The calls to the math and stat functions are very similar to how they are documented in C.

If you already have the C program written and you are wondering how to call PV-WAVE, take a look at the section of the documentation called Interapplication Communication. Points of interest in this section will be the CWAVEC function call, and how to access variables using the WAVEVARS function.

If you are looking to call a C program from PV-WAVE, look up the LINKNLOAD function.

-Ryan