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

3 vues (au cours des 30 derniers jours)
Gregory Plett
Gregory Plett le 6 Oct 2023
Commenté : Gregory Plett le 19 Oct 2023
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).

Réponses (1)

Shree Charan M L
Shree Charan M L le 19 Oct 2023
Modifié(e) : Shree Charan M L le 19 Oct 2023
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 commentaire
Gregory Plett
Gregory Plett le 19 Oct 2023
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!

Connectez-vous pour commenter.

Produits


Version

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by