How can i give a trained model some images as an input ?

L
Lukas Sohlbach · Sep 20, 2022 · 2.2K views
Question
I trained a model with classification learner to classify fruits. Now i want to test my model. How can i give the model some images as an input ?  
Expert Answer
Profile picture of Kshitij Singh
Kshitij Singh PhD Expert
Answered Aug 29, 2026
Hello,
in order to use the trained model to predict new data, you will first have to export the trained model to the workspace. You can click on the "Export Model" drop-down in the Classification Learner App, and select the first option. Once you have the trained model in the MATLAB workspace, you can call its "predict" method and supply new image data to make predictions.
 
100% Run Guarantee 3-Hour Fast-Track Delivery

Need a Custom Version or Complete Simulation for This Problem?

Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.

Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!