Problem with displaying signal at SignalEditor block output

1 次查看(过去 30 天)
Hi, I was trying to import an EMG signal from a csv. I generated it with a PC oscilloscope. In the editor window it displays well (Figure 1). But when I try to visualize it in a scope it looks like this (Figure 2).
I do not know if there is an additional configuration or block between the SignalEditor output and the Scope block.
Thank you!
(Attached csv file).

采纳的回答

vidyesh
vidyesh 2023-10-9
Hi Isaias Gatica,
I understand that you want to know why the data is visibly different when displayed in a scope and in the signal editor.
From the images uploaded I am assuming the data in second column of the ‘envolvente.csv’ file is being plotted vs the data in first column of the ‘envolvente.csv’.
The reason why you are getting a different output in the scope is due to solver settings. Please make the following changes to your Simulink model.
  • Set solver type to Fixed step.
Configuration Parameters (ctrl + e) -> Solver ->Solver Selection -> Type: -> Select Fixed-step from the drop-down list.
  • Change Stop time to 5000 and Step-size to 1 and
Configuration Parameters -> Solver -> Simulation time -> Stop time -> 5000.
Configuration Parameters -> Solver -> Solver details -> Fixed-step size -> 1.
Note that this is decided based on the data present in ‘envolvente.csv. After making the above changes, the graph in scope should match the graph from the signal editor.
You can refer the below documentation for more detailed information of Solvers and Step-size.
I hope my answer helps.

更多回答(0 个)

产品


版本

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by