Unable to add S-function to MATLAB path when using "addpath"
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
MathWorks Support Team
am 16 Feb. 2017
Beantwortet: MathWorks Support Team
am 16 Feb. 2017
I am experiencing an unusual issue where Simulink can't find a compiled S-Function, even when the folder that the function is located in is on the MATLAB path. I see an error saying "Double2Str.c cannot be found" or the like.
The commands I'm using to add the required folders to the MATLAB path are as follows :
addpath(genpath('apps/examples'));
addpath('lib');
addpath(genpath('robots'));
Akzeptierte Antwort
MathWorks Support Team
am 16 Feb. 2017
The commands you listed will not add the 'examples' folder located under 'apps' to the MATLAB path. This is because MATLAB R2016a does not implicitly add the path of the present working directory to the string arguments in "addpath", especially when you're trying to add subfolders. The commands you can use instead are as follows:
addpath(genpath([pwd '/apps/examples']));
addpath([pwd '/lib']);
addpath(genpath([pwd '/robots']));
Please note that in MATLAB R2016b, "addpath" implicitly adds the path of the present working directory. Therefore, the original commands would work in MATLAB R2016b.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!