simulink &m-file

1 Ansicht (letzte 30 Tage)
mohamed  al-asklany
mohamed al-asklany am 19 Mär. 2012
i have m-file code and a simulink model can i convert m-file code to block in simulink which i can make its input port a sinusoidal signal and its output port frequency of this signal m-file code: {%x input signal and fre output y=fft(x)/fs; y=fftshift(y); y=abs(y); fre=.5*fs+1-find(y==max(y),1);}

Akzeptierte Antwort

Kaustubha Govind
Kaustubha Govind am 19 Mär. 2012
  6 Kommentare
mohamed  al-asklany
mohamed al-asklany am 22 Mär. 2012
if i use simulation time inf.?
Kaustubha Govind
Kaustubha Govind am 22 Mär. 2012
You can use any simulation time, that doesn't affect the operation of the block - the model will just keep running until you stop it.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Programmatic Model Editing finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by