Ralf asked . 2023-08-11

How to locate all sl_customization files on the MATLAB path?

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?

which , sl_customization , Simulink , Get Started with Simulink

Expert Answer

John Williams answered . 2024-12-22 13:13:52

1) The official doc for which indates that "which -all" displays the paths to all items on the MATLAB path with the requested name, as well as any files in special folders that have been implicitly added to the path.
 
2) In R2022b, files with name including "sl_customization" (m or p files) can be found with Windows Explorer in MATLAB root folder as shown below. And none of the pathstr are members of MATLAB path as you can find with the script below.
 
 
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')

 


Not satisfied with the answer ?? ASK NOW

Frequently Asked Questions

MATLAB offers tools for real-time AI applications, including Simulink for modeling and simulation. It can be used for developing algorithms and control systems for autonomous vehicles, robots, and other real-time AI systems.

MATLAB Online™ provides access to MATLAB® from your web browser. With MATLAB Online, your files are stored on MATLAB Drive™ and are available wherever you go. MATLAB Drive Connector synchronizes your files between your computers and MATLAB Online, providing offline access and eliminating the need to manually upload or download files. You can also run your files from the convenience of your smartphone or tablet by connecting to MathWorks® Cloud through the MATLAB Mobile™ app.

Yes, MATLAB provides tools and frameworks for deep learning, including the Deep Learning Toolbox. You can use MATLAB for tasks like building and training neural networks, image classification, and natural language processing.

MATLAB and Python are both popular choices for AI development. MATLAB is known for its ease of use in mathematical computations and its extensive toolbox for AI and machine learning. Python, on the other hand, has a vast ecosystem of libraries like TensorFlow and PyTorch. The choice depends on your preferences and project requirements.

You can find support, discussion forums, and a community of MATLAB users on the MATLAB website, Matlansolutions forums, and other AI-related online communities. Remember that MATLAB's capabilities in AI and machine learning continue to evolve, so staying updated with the latest features and resources is essential for effective AI development using MATLAB.

Without any hesitation the answer to this question is NO. The service we offer is 100% legal, legitimate and won't make you a cheater. Read and discover exactly what an essay writing service is and how when used correctly, is a valuable teaching aid and no more akin to cheating than a tutor's 'model essay' or the many published essay guides available from your local book shop. You should use the work as a reference and should not hand over the exact copy of it.

Matlabsolutions.com provides guaranteed satisfaction with a commitment to complete the work within time. Combined with our meticulous work ethics and extensive domain experience, We are the ideal partner for all your homework/assignment needs. We pledge to provide 24*7 support to dissolve all your academic doubts. We are composed of 300+ esteemed Matlab and other experts who have been empanelled after extensive research and quality check.

Matlabsolutions.com provides undivided attention to each Matlab assignment order with a methodical approach to solution. Our network span is not restricted to US, UK and Australia rather extends to countries like Singapore, Canada and UAE. Our Matlab assignment help services include Image Processing Assignments, Electrical Engineering Assignments, Matlab homework help, Matlab Research Paper help, Matlab Simulink help. Get your work done at the best price in industry.