10-31-2022 10:58 AM
Hi everyone,
I have a MATLAB program that should fit an error function (4 fit parameter). Because it is not the easiest function I have to give some start parameter. I tried to estimate them from my data and it worked perfectly fine while doing it in MATLAB but if I use the same code in LabView the fit doesn't work anymore (even if the data is exactly the same).
Have you an idea why this is the case?
Because my code is pretty complicated I didn't attached the VI here. Hopefully you can me help anyway
Thank you for your help!
10-31-2022 11:11 AM - edited 10-31-2022 12:10 PM
@Annika111 wrote:
Hi everyone,
Hi! and welcome to the forum!
...
Because my code is pretty complicated I didn't attached the VI here. Hopefully you can me help anyway
The chances are pretty much zero without seeing what you are trying to do. Even just posting the MATLAB code will drastically increase your chances of a solution being found. Can you provide a minimal, reproducible example (https://stackoverflow.com/help/minimal-reproducible-example)?
I'd give it a decent chance that creating such an example may clear up the problem itself. A linear fit VI need not be complicated at all.
10-31-2022 11:38 AM - edited 10-31-2022 11:44 AM
Also chances are that using the nonlinear fit of LabVIEW would simplify things dramatically. What is the function? Do you have some typical data?
(For example, here's an old example to fit a 3 parameter error function. Read the entire thread.)
10-31-2022 12:00 PM
@Annika111 wrote:
it worked perfectly fine while doing it in MATLAB but if I use the same code in LabView the fit doesn't work anymore (even if the data is exactly the same).
You need to explain exactly what you are doing in LabVIEW and what "same code" means. Your description is way too ambiguous.
What is the meaning of "does not work"?
You really need to attach your code AND some typical data, no matter how big it is. 😄