Where to install libraries

86 views (last 30 days)
Ron Rosychuk
Ron Rosychuk on 2 Mar 2017
Commented: Ron Rosychuk on 3 Mar 2017
I downloaded some files from File Exchange to my Mac. When I tried to open and run a .slx file, I got some errors. Somewhere I read that the libraries should be installed on some kind of Matlab path. Can you tell me where it is located? I only found the MATLAB_R2016b icon on the Application folder. Cannot find a Matlab folder.

Answers (2)

Walter Roberson
Walter Roberson on 2 Mar 2017
If you are using a Mac (locations are different for other operating systems):
Some files are put into your ~/Documents/MATLAB directory and licenses and preferences are put into your ~/.matlab directory. Starting from R2016b, licenses and preferences are put into your ~/Library/Application\ Support/MathWorks directory instead of under ~/.matlab
If you download using the Add-On Explorer then everything necessary should be down-loaded for you and automatically put onto your MATLAB path; it is the ~/Documents/MATLAB/Add-Ons and ~/Documents/MATLAB/SupportPackages directory that would be used for that.
If you manually download from the File Exchange instead of using the Add-On Explorer, then you can put the download files anywhere convenient for you. You can then invoke the MATLAB
pathtool
and use that to add those directories to your MATLAB path.
Note: my recommendation when you use pathtool is to add such packages to the bottom of the list, so that if what you download accidentally has the same routine name as one of the built-in MATLAB routines, then existing routines will not suddenly stop working.
  2 Comments
Walter Roberson
Walter Roberson on 3 Mar 2017
Okay, it turns out that what you have to do for that demo is go to the MATLAB command prompt and execute
startup_Scissor_Lift
Ron Rosychuk
Ron Rosychuk on 3 Mar 2017
Yes, startup_Scissor_Lift works but I am learning how to make the model step by step by following the video: https://www.mathworks.com/videos/modeling-a-scissor-jack-68849.html
At 6:15, the guy opened the Scissor_Jack2_From_Libraries model and the simulation worked. I got a bunch of errors as mentioned.
Executing startup_Scissor_Lift first and then opened Scissor_Jack2_From_Libraries does not solve the problem.

Sign in to comment.


Ron Rosychuk
Ron Rosychuk on 3 Mar 2017
Thank you Walter. I deleted the files on my desktop and installed the files using the Add-On Explorer approach you mentioned. Some of the errors are gone but there is sill a list of errors namely: Error evaluating parameter X... Caused by: Undefined variable ...Para or class ....Component Simulink | Category:Modelerror
where X are: block_width, block_height, material_density, material_color, etc.
Know how to solve this problem?
  2 Comments
Walter Roberson
Walter Roberson on 3 Mar 2017
Which model did you install?
Ron Rosychuk
Ron Rosychuk on 3 Mar 2017
Scissor Lift Model in Simscape Multibody
I followed a YouTube video from MATLAB called "Modeling a Scissor Jack". At about 6:15, the guy opened Scissor_Jack2_From_Libraries and it was running fine for him. However, I got a list of errors mentioned above. I am running R2016b.

Sign in to comment.

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!