Where to install libraries

조회 수: 123 (최근 30일)
Ron Rosychuk
Ron Rosychuk 2017년 3월 2일
댓글: Ron Rosychuk 2017년 3월 3일
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