How upload a saved neural network in the GUI?

H
Hessam · Jul 16, 2021 · 1.9K views
Question
I am creating a GUI where there are two options to choose a network to use;   -Uploading an already trained net.   -Training a Network.   For the first choice I want to have the option to go to different directory and upload it. I am using the following command, but it loads the net as a character!! net = uigetfile; handles.net=net;
Expert Answer
Profile picture of Neeta Dsouza
Neeta Dsouza PhD Expert
Answered Aug 23, 2026
You saved the files with .mat extension, you need load command to load them to MATLAB not dlmread or fopen.
 
 
ListOfVariables = load(uigetfile);
If you saved tr and net in one file, they all will be loaded in ListofVariables, ListOfVariables is a structure, that contains all the variables in the .mat file.
 
You can use tr an net then, in your GUI.
 
handles.tr =  ListOfVariables.tr;

 

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!