Main Content

ModelAdvisor.Image

R2026b

Image in Model Advisor output

Description

Use ModelAdvisor.Image objects to display images in the Model Advisor output.

Creation

Description

image = ModelAdvisor.Image creates an image object for use in the Model Advisor output. The Model Advisor supports a wide range of image formats such as PNG, JPEG, JPG, BMP, and GIF.

example

Object Functions

setHyperlinkSet image link in Model Advisor output
setImageSourceSpecify image source in Model Advisor output

Examples

collapse all

Create an image object and customize its appearance and link destination for the Model Advisor.

Create a ModelAdvisor.Result object to store the check output. This object is returned to the Model Advisor and displayed in the result.

result = ModelAdvisor.ResultDetail;

Set a description for the check that appears in the Model Advisor output as an explanation of what the check does.

result.Description = "This check demonstrates the ModelAdvisor.Image usage.";

Create a ModelAdvisor.Image object.

image = ModelAdvisor.Image;

Assign a file to the image source.

setImageSource(image,'exampleImage1.jpg');

Add a link to the image.

setHyperlink(image,'https://www.mathworks.com');

Set the information to be displayed in the Model Advisor output.

result.Information = "Demonstration image:";

Version History

Introduced in R2006b