Folder for Simulink S-Functions

3 visualizaciones (últimos 30 días)
upt0zer0
upt0zer0 el 31 de Dic. de 2012
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.

Respuestas (1)

TAB
TAB el 1 de En. de 2013
Editada: TAB el 1 de En. de 2013
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 comentarios
upt0zer0
upt0zer0 el 1 de En. de 2013
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?
TAB
TAB el 2 de En. de 2013
Add your folder in matlab path. Thats it.
You can do this using command line.
>> addpath('MATLAB/FILES')
>> savepath

Iniciar sesión para comentar.

Categorías

Más información sobre Simulink Functions en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by