For methods defined in separate files, the constructor still needs to be in the directory , which effectively means that you have to define the methods in the installation directory. You can find that using the following command:
>> which -all timeseries
The first result is likely the constructor, which is located in the @timeseries folder.
For example, if you create a "power" function in this directory (you may need to copy it in outside MATLAB to ensure write access), you can then use the following commands to update MATLAB:
>> rehash toolboxcache
>> clear classes
While this will work, I wouldn't necessarily recommend it. There are a few other options you might consider:
- Use a subclass so that you do not have to change the installation directory.
- Define new post-processing functions in your current working directory that you could use directly. While you could match the names to the built-in functions, it would be wise to name them differently to ensure that you do not observe a number of shadowing errors.
- Alternatively, you could always store your Simulink outputs in another form, e.g. as an array.