Thank you very mch for the replies, I did not have time till now to check it. You were right with the TS_Ant being initialized to 150, I am not sure why it was like that, but thanks, I have chaned it, although it did not solve my problem.
So, actually the matlab code is the same, although written in an .m file:
The results of Labview compared to those of Matlab for the same period of time I plotted in a post before.
I think the problem is that somehow, I am not sure how, the RawData I am talking about is uploaded undersampled. Because I checked the file and actually it has the same precision as in Matlab...but when uploaded and plotted is different.
I am sorry I cannot upload the file, I cannot cut it for now. I will see if tomorrow I can do something.
I know I am not very precise, but this is a part of a quite huge program and is difficult to cut it around...
First, thank you very much for ur replies. Second, I am gonna kill myself. Stupid mistake: I had my file with dots instead of commas, so everything was uploaded like integers and so the derivatives were not smooth.
I note it hard-copy in my brain as the first thing to check next time I have a problem.