I can't open live script examples

Illustration
Ximena - 2021-04-05T11:07:28+00:00
Question: I can't open live script examples

Error using mkdir Sistem belirtilen dosyay? bulam?yor. Error in exampleUtils.setupWorkDir (line 4) mkdir(workDir) Error in setupExample (line 18) exampleUtils.setupWorkDir(workDir); Error in openExample (line 29)  I've got this error when i tried to open live script examples. When i clicked "view MATLAB command" button and following the instructions, gave me the error. One of the example is "Plan and Execute Task- and Joint-space Trajectories using KINOVA Gen3 Manipulator". How can i open and run this example on matlab? Is the example folder missing? If it is, how can i get the folder? And how can i insert the kinova robotic arm to matlab like the example shows?

Expert Answer

Profile picture of Neeta Dsouza Neeta Dsouza answered . 2025-11-20

It appears to me that the code attempts to use "userpath" followed by Examples followed by your MATLAB release, followed by an example-specific directory name, and creates that directory if it does not exist. It appears to me that it is failing to create the directory.
One way that could happen is if your "userpath" does not exist. userpath is
%     Windows: user's "Documents" folder appended with "MATLAB"
%     Mac:     user's "Documents" folder ($home/Documents) appended with "MATLAB"
%     Linux:   user's $home folder appended by "Documents" and "MATLAB"
You should check to see if that directory exists.
(On MS Windows systems in corporate environments, I have seen cases where the directory does not exist, when the user has been restricted to writing into network filesystem directories instead of local directories.)
In the meantime, there is a work-around:
openExample('robotics/PlanAndExecuteTaskAndJointSpaceTrajectoriesExample', 'workDir', 'NameOfDirectoryToUseForTheExample')
where 'workDir' is the literal string, and NameOfDirectoryToUseForTheExample should be replaced by the fully-qualified directory name to use . You should use a different directory name for each example.
 


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!