Main Content

setImageSource

R2026b

Specify image source in Model Advisor output

Description

setImageSource(image,source) sets the source of the image specified by image to the file or URL specified by source.

example

Examples

collapse all

Create an image object and set the source location of the image.

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;

Create a ModelAdvisor.Image object.

image = ModelAdvisor.Image;

Assign a file to the image source.

setImageSource(image,'exampleImage1.jpg');

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

result.Information = "Demonstration image:";

Input Arguments

collapse all

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

Image source, specified as a string scalar or character vector containing a web address, URL, or file path.

Example: 'exampleImage1.jpg'

Version History

Introduced in R2006b