This page helps troubleshoot warnings generated by the
convertMuPADNotebook
function when converting MuPAD® notebooks to MATLAB® live scripts. For the conversion steps, see Convert MuPAD Notebooks to MATLAB Live Scripts. To troubleshoot errors, see Troubleshoot MuPAD to MATLAB Translation Errors.
Warning Message | Meaning | Recommendations |
---|---|---|
Translating the alias function as an assignment, and the unalias function as deletion of an assignment. | The MuPAD
Creating aliases is not available in MATLAB. When translating a notebook file,
| Verify the resulting code. If you do not want a MuPAD alias to be converted to an assignment in MATLAB, adjust the code so that it does not use aliases. |
Replacing animation by its last frame. | MuPAD animations cannot be correctly reproduced
in MATLAB. When translating a notebook file, | Verify the resulting code. The last frame might not be ideal for some animations. If
you want the static image to show any other frame of the animation, rewrite the
MuPAD code so that it creates a static plot showing that image. If you want
to recreate the animation, rewrite the code in MATLAB by using |
Potentially incorrect MuPAD code ''{0}''. Replacing it by ''{1}''. | When translating a notebook file,
| Verify the corrected code. Then delete this warning. |
Invalid assignment to remember table. Replacing it by procedure definition. | When translating a notebook file, | Verify the corrected code. Then delete this warning. |
Replacing MuPAD domain by an anonymous function that creates objects similar to the elements of this domain. | Domains represent data types in MuPAD. They are not available in MATLAB.
| Verify the resulting code. Check if an anonymous MATLAB function is the correct translation of the domain in this case, and that the code still has the desired functionality. |
Ignoring addpattern command. Configurable pattern matcher not available in MATLAB. |
| Adjust the code to avoid using |
Ignoring assertions. | Assertions are not available in MATLAB. When translating
a notebook file, | Verify the resulting code. If assertions are not essential
part of your code, you can ignore this warning. However, if your code
relies on assertions, you can implement them using conditional statements,
such as |
Ignoring assignment to a MuPAD environment variable. | Environment variables are global variables, such as | Verify the resulting code. If an assignment to an environment variable is not essential for your code, simply delete the warning. In
some cases, you can use name-value pair arguments in each function
call, such as setting the value In other cases, there is no appropriate replacement. Adjust the code so that it does not require a global setting. |
Ignoring assignment to a protected MuPAD constant or function. | The names of the built-in MuPAD functions, options, and constants are protected. If you try to assign a value to a MuPAD function, option, or constant, the system throws an error. This approach ensures that you will not overwrite a built-in functionality accidentally. | Verify the resulting code. Check if the ignored assignment is essential for the correctness of the code and results. If it is, adjust the code so that it does not use this assignment, but still has the desired functionality. If it is not essential, simply delete this warning. |
Ignoring option ''hold''. |
| Adjust the code to avoid using |
Ignoring info command. Information not available in MATLAB. | MATLAB functions do not have associated information. | For information on a function, refer to MATLAB documentation. |
Ignoring options ''{0}''. | These options are available in MuPAD, but are not
available in MATLAB. Because they do not appear to be essential
for this code, | Verify the resulting code. Check if the ignored options are essential for the correctness of the code and results. If they are, adjust the code so that it does not use these options, but still has the desired functionality. If they are not essential, simply delete this warning. |
Ignoring MuPAD path variables. | The MuPAD environment variables These environment variables are not available in MATLAB. | Verify the resulting code. Check if the ignored path variables are essential for the correctness of the code and results. If they are, adjust the code so that it does not use these preferences, but still has the desired functionality. If they are not essential, simply delete this warning. |
Ignoring MuPAD preference because there is no equivalent setting in MATLAB. | The MuPAD MATLAB uses | Verify the resulting code. Check if the ignored preferences are essential for the correctness of the code and results. If they are not essential, simply delete this warning. |
Ignoring call to variable protection mechanism. | The names of the built-in MuPAD functions, options, and constants are protected. If you try to assign a value to a MuPAD function, option, or constant, the system throws an error. This approach ensures that you will not overwrite a built-in functionality accidentally. Protecting procedures and functions from overwriting is
not available in MATLAB. When translating a notebook file,
| Verify the resulting code. Check if the ignored call to variable protection mechanism is essential for the correctness of the code and results. If it is, adjust the code so that it does not use this call, but still has the desired functionality. If it is not essential, simply delete this warning. |
Ignoring default value when translating a table. | MuPAD tables let you set the default value. This
value is returned when you index into a table using the index for
which the entry does not exist. For example, if you create the table
using Default
values for tables cannot be translated to MATLAB. When translating
a notebook file, | Verify the resulting code. Check if the ignored value
is essential for the correctness of the code and results. If default
values for the tables are not essential, simply delete this warning.
Otherwise, you can create a MATLAB function that checks if the |
Unable to decide which object the indexing refers to, instead using generic translation. | When the class of the object being indexed into is ambiguous,
then | Verify that the generic translation returns the correct result. If not, adjust the code. |
Possibly missing a multiplication sign. | Do not skip multiplication signs in MuPAD and MATLAB code.
Both languages require you to type multiplication signs explicitly.
For example, the expression | Verify the converted code. Check if you missed a multiplication sign. Correct the code if needed. |
Expression used as operator. Possibly ''subs'' was intended. | An arithmetical expression is used as a function. | Verify that the translation returns the correct result. If not, adjust the code. |
MuPAD package mechanism not available in MATLAB. | The MuPAD package mechanism is not available in MATLAB. | Adjust the code to avoid using the MuPAD package mechanism. |