simulink &m-file
조회 수: 1 (최근 30일)
이전 댓글 표시
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);}
댓글 수: 0
채택된 답변
Kaustubha Govind
2012년 3월 19일
See the first line in my answer here: http://www.mathworks.se/matlabcentral/answers/26682-linking-simulink-from-m-file
댓글 수: 6
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 Center 및 File Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!