Receiving errors one line into my code

5 views (last 30 days)
Andie Reyes
Andie Reyes on 16 Jun 2020
If I run
syms x
I recieve these errors
Error using mupadmex
Error in MuPAD command; Unknown slot 'symobl::size'. [slot].
Error in sym/privsubsasgn (line 1110)
sL = eval(mupadmex('symobj::size',L.s,0));
Error in sym/subsasgn (line 963)
C = privsubsasgn(L,R,inds{:});
Error in syms (line 263)
defined(k) = nsym;
I have limited knowledge of matlab and am just using it for a calculus 3 class and lab

Answers (1)

Harsha Priya Daggubati
Harsha Priya Daggubati on 19 Jun 2020
Edited: Harsha Priya Daggubati on 19 Jun 2020
I could guess, this is because you donot have 'Symbolic Toolbox' installed in your MATLAB. Can you run the following command to check:
status = license('test','symbolic_toolbox')
If status is not 1, then you need to install the toolbox to proceed.
I hope this solves your issue, if not this might be due to the issue with MuPAD engine.
Harsha Priya Daggubati
Harsha Priya Daggubati on 23 Jun 2020
You can also try doing the following steps:
restoredefaultpath; rehash toolboxcache; savepath.
2. Use 'which -all' to verify that 'sym' , 'syms', and 'mupadmex' were not shadowed by other functions, and all were on the MATLAB path in the reported locations.
3. Verify that you did not have any permissions issues or blocks from antivirus programs.
4. Did a full uninstall and reinstall of MATLAB and Symbolic Math Toolbox, and then rebooted the machine.
If problem still persists, try the following: (The resolving steps are with respect to Mac Terminal, you can do manually if you are a windows user.)
The error appears to be related to the MuPAD engine, as the functions refer to an 'error using mupadmex'.
1. First, try to use 'mupadmex' on its own with a generic input:
mupadmex({'1','-1'}) % Generic input example
a. The expected output should look something like the following:
ans =
b. If you see the following error, than the issue lies within the MuPAD engine itself:
Error using mupadmex
Error in MuPAD command:
c. Now, confirm your findings by running the MuPAD engine from the MATLAB Command Window:
In the MuPAD window, select 'Notebook > Start Engine'. If this generates a 'Cannot start engine' error, then there is likely an issue with the engine.
2. Try the following steps to help diagnose this issue further.
- Start MATLAB
- Execute the following commands inside MATLAB:
system(ls -ld /var/tmp)
- Start MATLAB
- Execute the following commands inside MATLAB:
- If the MuPAD notebook shows up the second time, please try to do a computation, e.g. 1+1, inside the MuPAD notebook. What happens?
- Close the notebook
- Start MATLAB
- Execute the following command, which should result in the known error
syms x
- After that, try:
[status,result]=system(['echo quit |' matlabroot '/toolbox/symbolic/mupad/share/bin/mupkern -S'])
- Start MATLAB
[status,result]=system(['echo quit |' matlabroot '/toolbox/symbolic/mupad/share/bin/mupkern -S'])
3. Analyzing the results of the above commands:
If (a) shows the following:
ls: /var/tmp: No such file or directory
ans =
and (c) or (d) shows that the MuPAD kernel runs fine (status = 1) on the machine (even if it mentions a licensing issue), then the issue is likely related to the fact that the directory '/var/temp' is missing.
As a workaround, if possible, please close MATLAB, and then create '/var/temp' as root with the right permissions. The right permissions are:
> ls -ld /var/tmp
drwxrwxrwt 11 root wheel 374 Dec 5 02:30 /var/tmp
In order to achieve this, please do the following as root inside a Terminal shell (you might need "sudo" to create the directory:
mkdir -m 1777 /var/tmp
You might need to still change the group after this. You can use the following command:
chgrp wheel /var/tmp
Now, restart MATLAB. You should be able to use the Symbolic Math Toolbox as before.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!