模型设置里出现了模型参数意外错误, MATLAB 路径中的函数遮蔽了内置 MATLAB 函数,怎么解决哇?

11 visualizzazioni (ultimi 30 giorni)
智鹏
智鹏 il 2 Apr 2025
Risposto: Esther il 17 Apr 2025
创建 "模型配置参数" 对话框时出现意外错误。原因可能是您的 MATLAB 路径中的函数遮蔽了内置 MATLAB 函数。 类 matlab.internal.tabular.private.tabularDimension 没有名为 'subsType_reference' 的常量属性或静态方法。 file: D:\matlab2025\toolbox\matlab\datatypes\tabular\@tabular\parenReference.m

Risposte (1)

Esther
Esther il 17 Apr 2025
What is shadowing?
Shadowing is when the name of a custom function/file (e.g. M-file) has the same name as a shipping MATLAB function/file. When this happens, often the custom function is used in place of the built-in, which can lead to unexpected behavior. Shadowing can lead to both errors as well as silent wrong answers.
How can I detect potential shadowing?
1. The "which" function displays the full path of functions, files, and a workspace variable with the same name:
https://www.mathworks.com/help/releases/R2021b/matlab/ref/which.html
>> which <function_name> -all
2. WINDOWS ONLY: Please download the attached M-file ("shadowFinder.m"), run it, and observe the Command Window output. Please send this output to us as well. If custom functions are returned, try re-naming them. This will avoid a direct conflict with the MATLAB function's name and may fix the underlying issue.
There are many different scenarios and this function cannot guarantee to cover all cases. Just because a function is listed does not mean it is the root cause, and just because there are no functions listed does it mean shadowing is not present. Use these outputs merely as a starting point.

Categorie

Scopri di più su 启动和关闭 in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!