mphthumbnail
Set or get model thumbnail.
Syntax
mphthumbnail(model,filename)
mphthumbnail(model,image)
mphthumbnail(model,fig)
mphthumbnail(model,'')
[image,imagefilename] = mphthumbnail(model)
Description
mphthumbnail sets or gets the model thumbnail for model loaded on the server. In order to update the model thumbnail on disk the model must be saved.
mphthumbnail(model,filename) sets the thumbnail for the model to the image contained in filename. The file must be a PNG- or JPG-file.
mphthumbnail(model,image) sets the thumbnail using the image data image. image is either a NxM or a NxMx3 matrix. The preferred size of the image is 280 by 210 pixels.
mphthumbnail(model,fig) sets the thumbnail using the image in the figure with handle fig.
mphthumbnail(model, '') clears the thumbnail from the model.
[image,imagefilename] = mphthumbnail(model) gets the image data image and the image filename imagefilename for the thumbnail stored in the model model.
Example
Load model_tutorial_llmatlab.mph:
model = mphopen('model_tutorial_llmatlab');
Get the thumbnail image:
im = mphthumbnail(model);
Show the thumbnail in a MATLAB figure:
imshow(im)
Save the current figure image as an image file:
filename = fullfile(tempdir,'imagefile.png');
print(filename,'-dpng','-r48')
Set the thumbnail for the model:
mphthumbnail(model,filename)
See Also
mphload, mphsave