Troubleshoot MuPAD to MATLAB Translation Warnings

This page helps troubleshoot all 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 MessageMeaningRecommendations
Translating the alias function as an assignment, and the unalias function as deletion of an assignment.

The MuPAD alias and unalias function let you create and delete an alias (abbreviation) for any MuPAD object. For example, you can create an alias d for the diff function: alias(d = diff).

Creating aliases is not available in MATLAB. When translating a notebook file, convertMuPADNotebook replaces aliases with assignments.

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, convertMuPADNotebook replaces an animation with a static image showing the last frame of the animation.

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.

Potentially incorrect MuPAD code ''{0}''. Replacing it by ''{1}''.

When translating a notebook file, convertMuPADNotebook detected that the part of the code in the MuPAD notebook might be incorrect. For example, the code appears to have a typo, or a commonly used argument is missing.

convertMuPADNotebook corrected it.

Verify the corrected code. Then delete this warning.

Invalid assignment to remember table. Replacing it by procedure definition.

When translating a notebook file, convertMuPADNotebook considered an assignment to a remember table in a MuPAD notebook as unintentional, and replaced it by a procedure definition. For example, an assignment such as f(x):=x^2 gets replaced by f:= x->x^2.

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.

convertMuPADNotebook translated a MuPAD domain to a MATLAB anonymous function that creates objects similar to the elements of the domain. For example, the code line f:=Dom::IntegerMod(7) gets translated to a MATLAB anonymous function f = @(X)mod(X,sym(7)).

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.

addpattern functionality is not available in MATLAB.

Adjust the code to avoid using addpattern.

Ignoring assertions.

Assertions are not available in MATLAB. When translating a notebook file, convertMuPADNotebook ignores assertions.

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 if-then.

Ignoring assignment to a MuPAD environment variable.

Environment variables are global variables, such as HISTORY, LEVEL, ORDER, and so on, that affect the behavior of MuPAD algorithms.

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 Order in the taylor function call.

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. See Protect Function and Option Names.

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''.

hold is not available in MATLAB.

Adjust the code to avoid using hold.

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, convertMuPADNotebook ignores them.

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 FILEPATH, NOTEBOOKPATH, WRITEPATH, and READPATH let you specify the working folders for writing new files, searching for files, loading files, and so on if you do not specify the full path to the file.

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 Pref library provides a collection of functions which can be used to set and restore preferences, such as use of abbreviations in outputs, representation of floating-point numbers, memory limit on a MuPAD session, and so on.

MATLAB uses sympref for a few preferences, such as specifying parameters of Fourier transforms, specifying the value of the Heaviside function at 0, or enabling and disabling abbreviations in outputs. Most preferences cannot be translated to MATLAB code.

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. See Protect Function and Option Names.

Protecting procedures and functions from overwriting is not available in MATLAB. When translating a notebook file, convertMuPADNotebook ignores the corresponding MuPAD code.

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 T := table(a = 13,c = 42,10), and then index into it using T[b], the result is 10.

Default values for tables cannot be translated to MATLAB. When translating a notebook file, convertMuPADNotebook ignores the corresponding value.

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 containers.Map object corresponding to the MuPAD table has a certain key, and if it does not, returns the default value.

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 convertMuPADNotebook defaults to a generic translation for the indexing.

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 x(x + 1) must be typed as x*(x + 1).

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. convertMuPADNotebook attempted to fix the error.

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.