In MATLAB versions up to R2019b I was able to use which -all sl_customization to locate all sl_customization.m and sl_customization.p files on the MATAB search path. That doesn't work anymore in newer versions. Is there a new way to get this information?
John Williams answered .
2025-11-20
str2test_R2022b = [
"C:\Program Files\MATLAB\R2022b\examples\slrequirements\main\sl_customization.m"
"C:\Program Files\MATLAB\R2022b\toolbox\rtw\rtwdemos\crl_demo\sl_customization.m"
"C:\Program Files\MATLAB\R2022b\toolbox\qualkits\iec\ecoder\tests\sl_customization.m"
"C:\Program Files\MATLAB\R2022b\toolbox\rtw\rtwdemos\pil_demo\sl_customization.m"
"C:\Program Files\MATLAB\R2022b\toolbox\coder\advisor\examples\sl_customization.m"
"C:\Program Files\MATLAB\R2022b\resources\Sldv\en\ModelAdvisor\sl_customization.xml"
"C:\Program Files\MATLAB\R2022b\toolbox\rtw\rtwdemos\examplePilF28335\sl_customization.m"
"C:\Program Files\MATLAB\R2022b\examples\ecoder\main\sl_customization.m"
"C:\Program Files\MATLAB\R2022b\examples\slcheck\main\sl_customization.m"
"C:\Program Files\MATLAB\R2022b\examples\systemcomposer\main\sl_customization.m"];
is_in_path = false(1, length(str2test_R2022b));
for i = 1:length(str2test_R2022b)
[pathstr, name, ext] = fileparts(str2test_R2022b(i));
is_in_path(i) = contains(lower(path), lower(pathstr{1}));
end
is_in_path = 1×10 logical array 0 0 0 0 0 0 0 0 0 0
3) On the other hand in R2019b, files with name including "sl_customization" (m or p files) can be found with Windows Explorer in MATLAB root folder as shown below. And 23 of them are included in the MATLAB path. This is what is shown in "which -all".
str2test_R2019b = [
"C:\Program Files\MATLAB\R2019b\toolbox\autoblks\autoblksutilities\sl_customization.p"
"C:\Program Files\MATLAB\R2019b\toolbox\aeroblks\aeroblksutilities\sl_customization.p"
"C:\Program Files\MATLAB\R2019b\toolbox\plccoder\plccoder\ladderlogic\plclib\studio5000\sl_customization.p"
"C:\Program Files\MATLAB\R2019b\toolbox\shared\aeroblks\aeroblksutilities\sl_customization.p"
"C:\Program Files\MATLAB\R2019b\toolbox\slcoverage\sl_customization.p"
"C:\Program Files\MATLAB\R2019b\toolbox\simulink\simulink\modeladvisor\sl_customization.p"
"C:\Program Files\MATLAB\R2019b\toolbox\simulink\sta\sl_sta_editor_block\sl_customization.p"
"C:\Program Files\MATLAB\R2019b\toolbox\simulink\simulink\SortingCheck\sl_customization.p"
"C:\Program Files\MATLAB\R2019b\toolbox\shared\codeinstrum\codeinstrum\sl_customization.p"
"C:\Program Files\MATLAB\R2019b\toolbox\fixedpoint\embeddedlib\sl_customization.m"
"C:\Program Files\MATLAB\R2019b\toolbox\robotics\robotsimulink\sl_customization.m"
"C:\Program Files\MATLAB\R2019b\toolbox\nav\navsimulink\sl_customization.m"
"C:\Program Files\MATLAB\R2019b\toolbox\shared\robotics\robotslcore\sl_customization.m"
"C:\Program Files\MATLAB\R2019b\toolbox\stateflow\stateflow\sl_customization.m"
"C:\Program Files\MATLAB\R2019b\examples\slcheck\main\sl_customization.m"
"C:\Program Files\MATLAB\R2019b\examples\slrequirements\main\sl_customization.m"
"C:\Program Files\MATLAB\R2019b\toolbox\slcheck\slcheckdemos\advisordemos\sl_customization.m"
"C:\Program Files\MATLAB\R2019b\toolbox\simrf\simrf\sl_customization.m"
"C:\Program Files\MATLAB\R2019b\toolbox\rtw\rtwdemos\crl_demo\sl_customization.m"
"C:\Program Files\MATLAB\R2019b\toolbox\qualkits\iec\ecoder\tests\sl_customization.m"
"C:\Program Files\MATLAB\R2019b\toolbox\rtw\rtwdemos\pil_demo\sl_customization.m"
"C:\Program Files\MATLAB\R2019b\toolbox\coder\advisor\examples\sl_customization.m"
"C:\Program Files\MATLAB\R2019b\toolbox\rtw\rtwdemos\examplePilF28335\sl_customization.m"
"C:\Program Files\MATLAB\R2019b\toolbox\physmod\elec\library\m\sl_customization.p"
"C:\Program Files\MATLAB\R2019b\toolbox\physmod\ne_sli\ne_sli\sl_customization.p"
"C:\Program Files\MATLAB\R2019b\toolbox\shared\nav_rst\nav_rst_simulink\sl_customization.m"
"C:\Program Files\MATLAB\R2019b\toolbox\robotics\robotsimulink\robotslgazebo\sl_customization.m"
"C:\Program Files\MATLAB\R2019b\toolbox\robotics\robotsimulink\robotslmanip\sl_customization.m"
"C:\Program Files\MATLAB\R2019b\toolbox\robotics\robotsimulink\robotslmobile\sl_customization.m"
"C:\Program Files\MATLAB\R2019b\toolbox\physmod\powersys\library\sl_customization.p"
"C:\Program Files\MATLAB\R2019b\toolbox\slcontrol\slctrlutil\sl_customization.p"];
is_in_path = false(1,length(str2test_R2019b));
for i = 1:length(str2test_R2019b)
[pathstr, name, ext] = fileparts(str2test_R2019b(i)); % Run this in R2019b
pathstr_saved{i} = pathstr{1};
is_in_path(i) = contains(lower(path), lower(pathstr{1}));
end
pathstr_saved(is_in_path)
whichpath = which('sl_customization','-all')