A class providing interface to load variables from a file.
More...
A class providing interface to load variables from a file.
Definition at line 24 of file LoadFromFile.m.
◆ LoadFromFile()
| function LoadFromFile::LoadFromFile |
( |
filenev |
| ) |
|
Constructor of the class.
- Parameters
-
| filenev | The string of the absolute path to the file to open. (Matlab can operate with relative paths as well) |
- Returns
- An instance of the class
◆ ClearLoadedVariables()
| function LoadFromFile::ClearLoadedVariables |
( |
| ) |
|
Disposes the loaded file.
◆ LoadVariable()
| function LoadFromFile::LoadVariable |
( |
varname |
, |
|
|
varargin |
|
|
) |
| |
Loads a variable from the opened file.
- Parameters
-
| varname | The string containing the name of the variable. |
| varargin | Cell array of optional parameters (https://www.mathworks.com/help/matlab/ref/varargin.html): |
| 'NoEmpty' | Set 'On' for throw an error when the loaded variable is empty, or 'Off' (default) otherwise. |
| 'StructName' | String containing the name of a structure, when the wanted variable is a field of a structure. |
◆ SaveLoadedVariables()
| function LoadFromFile::SaveLoadedVariables |
( |
varargin |
| ) |
|
Save the loaded variables.
- Parameters
-
◆ setLoadedVariable()
| function LoadFromFile::setLoadedVariable |
( |
varname |
, |
|
|
value |
, |
|
|
varargin |
|
|
) |
| |
Sets a loaded variable.
- Parameters
-
| varname | The string containing the name of the variable. |
| value | The value to be set. |
| varargin | Cell array of optional parameters (https://www.mathworks.com/help/matlab/ref/varargin.html): |
| 'NoEmpty' | Set 'On' for throw an error when the loaded variable is empty, or 'Off' (default) otherwise. |
| 'StructName' | String containing the name of a structure, when the wanted variable is a field of a structure. |
◆ filename
| Property LoadFromFile::filename |
|
protected |
◆ LoadedVariable
| Property LoadFromFile::LoadedVariable |
|
protected |
structure containing the loaded data
Definition at line 31 of file LoadFromFile.m.
The documentation for this class was generated from the following file: