Clearing and reloading updates form initialization file in a class
4 vues (au cours des 30 derniers jours)
I'm trying to set the properties of a class by loading the contents of the initialization file (contains user-defined inputs) in a class method.
Source for INI class (https://www.mathworks.com/matlabcentral/fileexchange/55766-ini).
test_graph = settings_utils.data.test_graph;
function data = load_data
I = INI('File','input.ini');
data = I.get('UserData'); % struct
example.ini includes the following
test_graph = 'test1'
If the user changes the input in example.ini ('test1' is changed to 'test2'), clear settings followed by setting.test_graph
But I am not sure how this works while creating executables. I have converted my main.m function into a executable using the Application compiler. I want the user to specify inputs (loaded from .ini file in `setting` class), .ini file is not converted into a binary file during compilation (i.e. I have excluded the example.ini file from `Files required for your application to run` tab in the Application compiler.) And the setting class (used in main) and other relevant functions are packaged into an executable.
In this case , I am not sure how the clases are cleared by the executable and how to load the new changes made in .ini in the settings class.
Could someone please give suggestions?