Can't open *.m files

2 ビュー (過去 30 日間)
Regina K
Regina K 2024 年 6 月 19 日
回答済み: Vandit 2024 年 6 月 19 日
Hello, I'm using MATLAB R2020b and there's a problem while opening *.m files.
The error message says:
'unarginchk' is an unrecognized function or variable.
Error occurred: onCleanup (line 52)
unarginchk(1,1);
Error occurred: getnicedialoglocation (line 23)
c = onCleanup(@() close(convertData.hFig));
Error occurred: msgbox (line 332)
DefFigPos = getnicedialoglocation(DefFigPos, get(figureHandle, 'Units'));
Error occurred: errordlg (line 59)
handle = msgbox(ErrorStringCell, dlgName, 'error', replace);
Error occurred: uiopen (line 185)
errordlg(err);

回答 (2 件)

Angelo Yeo
Angelo Yeo 2024 年 6 月 19 日
I believe the function name is changed unintentionally. It's supposed to be narginchk not unarginchk.
which -all narginchk
built-in (/MATLAB/toolbox/matlab/lang/narginchk)
which -all unarginchk
'unarginchk' not found.
Below is how line 52 of onCleanup.m is supposed to be in MATLAB R2020b.

Vandit
Vandit 2024 年 6 月 19 日
Hello Regina,
I understand you are facing a problem while opening ".m" files in MATLAB R2020b. Without access to the source code, pinpointing the exact solution to your query is challenging. However, based on the error message you've shared, I can offer some guidance on addressing the "Undefined function or variable 'x'" issue. Please refer to the documentation below, which outlines some possible solutions for this error:
Hope this helps.

カテゴリ

Help Center および File ExchangeError Handling についてさらに検索

タグ

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by