simulink &m-file

조회 수: 1 (최근 30일)
mohamed  al-asklany
mohamed al-asklany 2012년 3월 19일
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);}

채택된 답변

Kaustubha Govind
Kaustubha Govind 2012년 3월 19일
  댓글 수: 6
mohamed  al-asklany
mohamed al-asklany 2012년 3월 22일
if i use simulation time inf.?
Kaustubha Govind
Kaustubha Govind 2012년 3월 22일
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.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by