1

I have saved a neural network in .mat and I would like to simulate this file in my gui. Is it necessary to import this file into workspace then only import from workspace into gui OR we can load it in the gui without having to import it into workspace at first?

Thank you and your help is greatly appreciated.

Zaheer Ahmed
  • 28,160
  • 11
  • 74
  • 110
wan
  • 141
  • 2
  • 3
  • 11

1 Answers1

0

Take a look at this page in the MATLAB documentation. I quote:

The following command loads all variables from the example file durer.mat:

load('durer.mat')

To load variables into a structure array, specify an output variable for the load function:

durerStruct = load('durer.mat')

So in this way you avoid using the workspace. Another possibility is described as well:

The matfile function allows you import part of a variable, which requires less memory than loading an entire variable. For example, load the first 50 rows from variable topo in topography.mat into a variable called partOfTopo:

topography = matfile('topography.mat');
partOfTopo = topography.topo(1:50,:);
mmumboss
  • 690
  • 1
  • 5
  • 13