How can i import a signal in simulink

1 次查看(过去 30 天)
Hi everyone I have a matrix in matlab which has two columns(first column for time and second one the amplitude), I need to either import it in simulink and pass it through the low pass filter or get the Fourier transform in matlab and then multiply it by filter's function.So lets say I want to know how to import this matrix as a signal in simulink or how to fft in matlab. I tried to import it in simulink but it does not show the signal. Thanks in advance.

回答(2 个)

Honglei Chen
Honglei Chen 2011-9-6
Hi Nima,
There is a From Workspace block that you can use to import the signal from work space to Simulink, see
To do FFT in MATLAB, simply call fft function on your data, e.g.
y = fft(x)
You can do
doc fft
to find more information and examples.
HTH

ni david
ni david 2011-9-7
buddy sorry but i am lost, my array has 1450 row and the first column is time and the second one is amplitude, the time scale is micro second, anyways when i import is into the simulink it doesnt show the signal correctly and abt the matlab, I did fft although the oupu is strange but anyways what I need is to pass it trhough a filter and the H(s) of the filters is 1/(1+10^-8)but im kind of confused in calculate the ans in frequency domain,so probably simulink is better but still my problem is that simulink does not show the signal properly,also when i use sim out the output in workspace is really strange! thanks for your time and consideration.

Community Treasure Hunt

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

Start Hunting!

Translated by