Main Content

setHyperlink

R2026b

Set image link in Model Advisor output

Description

setHyperlink(image,url) associates a link with the image specified by image in the Model Advisor output. Clicking the image directs you to the link specified by url.

example

Examples

collapse all

Create an image object to use in Model Advisor output and associate a link with it.

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

result = ModelAdvisor.ResultDetail;

Create a ModelAdvisor.Image object.

img = ModelAdvisor.Image;

Assign a file to the image source.

setImageSource(img,'exampleImage1.jpg');

Add a link to the image.

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

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

result.Information = "Demonstration image with link:";

Input Arguments

collapse all

Image displayed in the Model Advisor output, specified as a ModelAdvisor.Image object.

Image link destination, specified as a string scalar or character vector.

Version History

Introduced in R2006b