Where to install libraries

121 次查看(过去 30 天)
Ron Rosychuk
Ron Rosychuk 2017-3-2
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.

回答(2 个)

Walter Roberson
Walter Roberson 2017-3-2
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 个评论
Walter Roberson
Walter Roberson 2017-3-3
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 2017-3-3
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.

请先登录,再进行评论。


Ron Rosychuk
Ron Rosychuk 2017-3-3
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 个评论
Walter Roberson
Walter Roberson 2017-3-3
Which model did you install?
Ron Rosychuk
Ron Rosychuk 2017-3-3
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.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by