Folder for Simulink S-Functions

Hi there,
I have a model with many S-Function m-files. The files are all in my MATLAB main folder. When I try wo make a folder for the files, Simulink don't accept the path. But all files in the main folder is a kind of chaos... is there an opportunity to make a folder for the m-files?
Thx for any kind of help.

답변 (1개)

TAB
TAB 2013년 1월 1일
편집: TAB 2013년 1월 1일

1 개 추천

S-function do not accept file path as s-function name. You can do in this way
  1. Put your m files in different folders as you want.
  2. Add these folders to matlab path.
  3. Now simulink s-function will automatically find m-files residing in these paths.

댓글 수: 2

upt0zer0
upt0zer0 2013년 1월 1일
Ok I have the MATLAB Main Folder... Then I put my files in a folder MATLAB/FILES.
And what I must do for the second thing? can u give me an example?
Add your folder in matlab path. Thats it.
You can do this using command line.
>> addpath('MATLAB/FILES')
>> savepath

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

카테고리

도움말 센터File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품

질문:

2012년 12월 31일

Community Treasure Hunt

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

Start Hunting!

Translated by