Why do I receive an error while using smimport (Undefined function or variable 'sm_robot_DataFile', smimport_implementation error in line 165)?

I just typed
smimport('sm_robot')
And the error is as follows. (that's the example in matlab. I don't know the reason for this.)
Error using smimport_implementation
Workspace for block diagram 'robot' was not loaded because an error occurred while loading the MATLAB-file
'E:\matlab2018R\toolbox\physmod\sm\smdemos\import\robot\sm_robot_DataFile.m'.
Error in smimport (line 165)
smimport_implementation(multibodyDescriptionFile, varargin{:});
Caused by:
Error using smimport_implementation
Undefined function or variable 'sm_robot_DataFile'.
But I still got the simulink model, with errors in it.
The errors are as follows.
p1.jpg

1 件のコメント

Hey Hi, I'm receiving the same error. Do you have any idea why?
Yatish.

サインインしてコメントする。

回答 (1 件)

Steve Miller
Steve Miller 2021 年 11 月 17 日
You need to run that function when you are in a directory where you have write access.
Your screenshot shows you are in the installation directory. Unless you started MATLAB with Administrator rights, you will not be able to write to that directory.
--Steve

カテゴリ

ヘルプ センター および File ExchangeModel Import についてさらに検索

製品

リリース

R2018b

質問済み:

2018 年 12 月 5 日

回答済み:

2021 年 11 月 17 日

Community Treasure Hunt

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

Start Hunting!

Translated by