Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Receive uniform Data from scope

조회 수: 2 (최근 30일)
Pierrick GERVASI
Pierrick GERVASI 2017년 6월 4일
마감: MATLAB Answer Bot 2021년 8월 20일
Hello everybody!
I'm a total beginner on Matlab. I'm working on Simscape electronics on an audio amplifier and i've finished the modelization. I connected some scopes in order to see the current and voltage input and ouputs. I connected to these the blocs "To workspace" and received all the data from it.
I would like to analyse this data, view the frequencies spectrum, analyse SINAD, THD, SNR...
However, when I use these functions, the axes are totally wrong and i think that I know why.
For example, when i go to the see the voltage output data, the Time vector with the data isn't uniform, which means that values aren't taken "every x seconds" but it's like it is random.
I think that is it the reason why no signal analysis function works on my data, because the fact that values aren't taken uniformly.
Could you help me solving this issue please? thank you very much!!

답변 (1개)

Brian Hannan
Brian Hannan 2017년 6월 7일
Hi Pierrick,
It sounds like your simulation is using a variable-step solver. You can find more information about solvers here.
You can use a couple of techniques to get uniform time spacing your MATLAB workspace data. One option is to change the solver from variable-step to fixed-step. However, if your application requires a variable-step solver, you can use "interp1" to interpolate the signal.

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by