Receiving errors one line into my code

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)

Hi,
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.

4 Comments

Just tried it, status is 1.
Hi,
You can also try doing the following steps:
1.
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 =
'_symans_32_0_25'
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:
mupad
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.
(a)
- Start MATLAB
- Execute the following commands inside MATLAB:
matlabroot
system(ls -ld /var/tmp)
- Quit MATLAB
(b)
- Start MATLAB
- Execute the following commands inside MATLAB:
mupad
mupad
- 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
- Quit MATLAB
(c)
- 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'])
- Quit MATLAB
(d)
- Start MATLAB
[status,result]=system(['echo quit |' matlabroot '/toolbox/symbolic/mupad/share/bin/mupkern -S'])
- Quit MATLAB
3. Analyzing the results of the above commands:
If (a) shows the following:
ls: /var/tmp: No such file or directory
ans =
1
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.
Thank you so much for this answer. The symbolic toolbox was not working on Mac OS Ventura even though the directory /var/tmp existed. Once I set the directory permissions for /var/tmp as follows:
sudo chmod 777 /var/tmp
and restarted matlab it finally works again.
Note:
These days the mupad command has been removed from MATLAB.

Sign in to comment.

Products

Release

R2019b

Asked:

on 16 Jun 2020

Commented:

on 13 Oct 2023

Community Treasure Hunt

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

Start Hunting!