Find reason for this warning msg: Variable 'hws' originally saved as a handle cannot be instantiated as an object and will be read in as a uint32.
Mostra commenti meno recenti
load_system('input_check')
hws = get_param('input_check', 'modelworkspace');
hws.DataSource = 'MAT-File';
hws.FileName = 'slx_input_check_pars.mat';
hws.reload; % Line 66
% sim('input_check')
close_system('input_check')
I am loading some parameters to model workspace of Simulink model 'input_check', code is shown above, run the code get a warning msg as,
Warning: Variable 'hws' originally saved as a handle cannot be instantiated as an object and will be read in as a uint32.
> In run_idp (line 66)
line 66 is marked in the code, % Line 66
I am worried about whether this property woud cause error later so want to know what causes this warning. Isn't 'reload' a valid function?
Another example from: https://www.mathworks.com/help/simulink/ug/change-model-workspace-data.html
hws = get_param(bdroot, 'modelworkspace');
hws.DataSource = 'MAT-File';
hws.FileName = 'params';
hws.assignin('pitch', -10);
hws.assignin('roll', 30);
hws.assignin('yaw', -2);
hws.saveToSource;
hws.assignin('roll', 35);
hws.reload;
2 Commenti
Fangjun Jiang
il 9 Lug 2020
can you step through the code line by line and run get(hws) before the warning appears?
Hainan Wang
il 9 Lug 2020
Modificato: Hainan Wang
il 9 Lug 2020
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Manage Design Data in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
