| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Stateflow |
| Contents | Index |
| Learn more about Stateflow |
| On this page… |
|---|
If you specify paths and files with absolute paths and later move them, you must change these paths to point to new locations. To avoid this problem, use relative paths for custom code options that specify paths or files.
Search paths exist relative to these folders:
The current folder
The model folder (if different from the current folder)
The custom list of folders that you specify
All the folders on the MATLAB search path, excluding the toolbox folders
When you construct relative paths for custom code, follow these syntax rules:
You can use the forward slash (/) or backward slash (\) as a file separator, regardless of whether you are on a UNIX or PC platform. The makefile generator parses these strings and returns the path names with the correct platform-specific file separators.
You can use tokens that evaluate in the MATLAB workspace, if you enclose them with dollar signs ($...$). For example, consider this path:
$mydir1$\dir1
In this example, mydir1 is a string variable that you define in the MATLAB workspace as 'd:\work\source\module1'. In the generated code, this custom include path appears as:
d:\work\source\module1\dir1
You must enclose paths in double quotes if they contain spaces or other nonstandard path characters, such as hyphens (-).
![]() | Using the Command-Line API to Set Parameters for Simulation and Embeddable Code Generation | Choosing a Compiler | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |