MuPAD® notebooks will be removed in a future release. Use MATLAB® live scripts instead.
MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.
The MuPAD® kernel uses an xml format to communicate with
the renderer. Usually, a
plot command in MuPAD sends
a stream of xml data directly to the viewer which renders the picture.
After double clicking on the picture, the viewer (see section Viewer, Browser, and Inspector: Interactive Manipulation) provides a menu item ‘Edit/Export…’ that opens a dialog allowing to save the picture in a variety of graphical formats:
The ‘VCam Graphics’ format, indicated by the file extension ‘.xvz’. This is a compressed version of the xml ascii data used by MuPAD.
The ‘Uncompressed VCam Graphics’ format, indicated by the file extension ‘.xvc,’ saves these xml data in an uncompressed ascii file (the resulting file can be read with any text editor).
One can use the MuPAD graphics tool ‘VCam’ to open such files and display the xml data.
Further, there are various standard bitmap formats such as bmp, jpg, eps etc. in which the image may be stored.
MuPAD plots can also be saved in “batch mode”
by specifying the attribute
OutputFile = filename in
plot(primitives, OutputFile = "mypicture.xvz"):
Here, the extension
.xvz of the file name
that the MuPAD xml data are to be written and, finally, the file
is to be compressed. Alternatively, the extension
be used to write the xml data without final compression of the file
(the resulting text file can be read with any text editor). Files
in both formats can be opened by the MuPAD graphics tool ‘VCam’
to generate the plot encoded by the xml data.
If the MuPAD environment variable
WRITEPATH does not have
a value, the previous call creates the file in the directory where MuPAD is
installed. An absolute pathname can be specified to place the file
plot(primitives, OutputFile = "C:\\Documents\\mypicture.xvz"):
Alternatively, the environment variable
WRITEPATH := "C:\\Documents": plot(primitives, OutputFile = "mypicture.xvz"):
Now, the plot data are stored in the file ‘
If a MuPAD notebook of is saved to a file, its location
is available inside the notebook as the environment variable
If you wish to save your plot in the same folder as the notebook,
you may call
plot(primitives, OutputFile = NOTEBOOKPATH."mypicture.xvz"):
Apart from saving files as xml data, MuPAD pictures can
also be saved in a variety of standard graphical formats such as jpg,
eps, svg, bmp etc. In batch mode, the export is triggered by the
in the same way as for saving in xml format. Just use an appropriate
extension of the filename indicating the format. The following commands
save the plot in four different files in jpg, eps, svg, and bmp format,
plot(primitives, OutputFile = "mypicture.jpg"): plot(primitives, OutputFile = "mypicture.eps"): plot(primitives, OutputFile = "mypicture.svg"): plot(primitives, OutputFile = "mypicture.bmp"):
On Windows® systems, an animated MuPAD plot can be exported to avi format:
plot(plot::Function2d(sin(x - a), x = 0..2*PI, a = 0..5) OutputFile = "myanimation.avi"):
If no file extension is specified by the file name, the default
.xvc is used, i.e., compressed xml data
OutputOptions = [<ReduceTo256Colors =
b >, <DotsPerInch = n1>, <Quality
= n2>, <JPEGMode = n3>,
<EPSMode = n4>, <AVIMode = n5>,
<WMFMode = n6>, <FramesPerSecond =
n7>, <PlotAt = l1>]
Each entry of the list is optional. The parameters are:
|Positive integer setting the resolution in dpi (dots per inch). Has an effect for export to raster formats only. The default value depends on the hardware.|
|One of the integers 1, 2, …, 100.
This integer represents a percentage value determining
the quality of the export. Has an effect
for jpg, 3D eps, 3D wmf, and avi export only. The default
value is |
|Positive integer setting the frames per second
for the avi to be generated. Has an effect for avi
export only. The default value is |
|List of real values between |