필터 지우기
필터 지우기

The specified superclass 'symbolic.​mixin.abst​ractsize' contains a parse error ...

조회 수: 4 (최근 30일)
Gregory Plett
Gregory Plett 2023년 10월 6일
댓글: Gregory Plett 2023년 10월 19일
When I type in "syms var", I get the error "The specified superclass 'symbolic.mixin.abstractsize' contains a parse error"... I have tried the solutions I found online to see what the conflicting function might be and I cannot find it. "which -all syms" gives the result:
/Applications/MATLAB_R2023b.app/toolbox/symbolic/symbolic/syms.m
When I do a "dbstop error", it stops on line 231, which is: "defined = sym(zeros(1, length(args)));". I type in "which -all sym" and I get the result:
/Applications/MATLAB_R2023b.app/toolbox/symbolic/symbolic/@sym/sym.m
So, the functions exist, appear to be unique, but give errors. "sym" is a classdef that appears to depend on "matlab.mixin.CustomCompactDisplayProvider". When I search for that, I get: "/Applications/MATLAB_R2023b.app/toolbox/matlab/lang/+matlab/+mixin/CustomCompactDisplayProvider.m". It also seems to depend on "symbolic.mixin.abstractsize". When I search for that, via: "which -all symbolic.mixin.abstratctsize", I get "'symbolic.mixin.abstractsize' not found." The file does indeed exist as:
/Applications/MATLAB_R2023b.app/toolbox/symbolic/symbolic/+symbolic/+mixin/@abstractsize/abstractsize.m
But even when I add the symbolic folder to my path via addpath(genpath('/Applications/MATLAB_R2023b.app/toolbox/symbolic/')), I get the same error.
Any advice? (I'm reporting this for R2023b, but I have had the problem with prior releases also and am finally getting around to asking for help).

답변 (1개)

Shree Charan M L
Shree Charan M L 2023년 10월 19일
편집: Shree Charan M L 2023년 10월 19일
Hi Gregory,
I understand that you are not able to use the syms var’ command.
Here are some things you could do that might resolve the issue:
1) Verify symbolic toolbox installation: Go to MATLAB Home Tab, select Add-Ons > Manage Add-Ons and double-check whether Symbolic Math Toolbox is installed correctly.
2) Clear MATLAB cache: Sometimes, MATLAB's cache can cause conflicts or errors. Try clearing the MATLAB cache. The following code snippet does this for you:
clear all
rehash toolbox
rehash toolboxcache
3) Check for conflicting functions: It is possible that there may be conflicts with other functions. Check if you have any user-defined functions or variables with the same name as the symbolic functions.
Hope this helps and resolves the error “The specified superclass 'symbolic. mixin.abstaractsize' contains a parse error
  댓글 수: 1
Gregory Plett
Gregory Plett 2023년 10월 19일
Thank you so much for your help. I received the following email from MathWorks support, and it solved the problem:
Before modifying the search path, it is important to take a backup of your 'pathdef.m' file, which can be located by using the command:
>> which -all pathdef
Before proceeding, ensure that you make a safe copy of the file by copying it to a folder outside of your MATLAB path.
After taking the backup, please execute the following commands in the MATLAB Command Window to restore the default MATLAB search path and rehash the toolbox cache:
>> restoredefaultpath
>> rehash toolboxcache
After this step, please use MATLAB to see if you are still encountering the error message. If the issue is resolved, then you may want to save the new MATLAB search path by executing the following command:
>> savepath
IMPORTANT NOTE: Following these instructions will remove any custom paths you may have created.
The part that I was missing was "rehash toolboxcache", which you also mention. Now, everything is functioning as expected. Thank you again!

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Function Creation에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by