Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Continuous analog data are different if extracted using c++ code or openNSx.m in Matlab #75

Open
FlavioRaschella opened this issue Apr 20, 2017 · 3 comments

Comments

@FlavioRaschella
Copy link

Hi,

I managed to extract real-time analog input data on my c++ code on Visual Studio. I use an existing recording played back on NPlayServer.
What I did is to get the analog input samples and copy them into a .txt file, in an iterative process. When I plot them, they look similar to the signal displayed on Central, using the NPlayServer.

Instead, when I extract the data directly from the recording file using openNSx.m in Matlab, the data look different (Figures 1 and 2 ). Most of the time the data saturates.
It almost seems that the c++ dataset is the filtered version of the matlab dataset.

noisedata
Figure 1: noisy dataset (blue: extracted using matlab; red; extracted using c++ code)

recdata
Figure 2: muscle contraction dataset (blue: extracted using matlab; red; extracted using c++ code)

Let me know if you may have ideas of why it happens.

Thanks in advance,
Flavio

@dashesy
Copy link
Collaborator

dashesy commented Aug 1, 2017

It looks like data corruption when read by openNSX, I do not think it is related to filters

@FlavioRaschella
Copy link
Author

FlavioRaschella commented Aug 4, 2017 via email

@dashesy
Copy link
Collaborator

dashesy commented Aug 4, 2017

Also you can capture the raw, that will not be filtered for certain and you can then compare.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants