How to read mpt.parameter present in workspace

3 Comments

Read about structure.
In my workspace im having both constants and mpt.parameters,when im reading from workspace,i can jus access the names but not other fields of mpt.parameter
All_Data=whos
for i=1:length(All_Data)
All{i,2}=All_Data(i).class;
All{i,1}=All_Data(i).name;
if(strcmp(All{i,2},'mpt.Parameter'))
All_DataType=All_Data(i).DataType;
%All_value=evalin('base',All{i,1});
All_value=All_Data(i).Value
All{i,2}=strcat(All_DataType,'(',num2str(All_value),')');
else
All_value=evalin('base',All{i,1});
All{i,2}=strcat(All{i,2},'(',num2str(All_value),')');
end
end

Sign in to comment.

Answers (0)

Tags

Asked:

on 9 Jun 2020

Commented:

on 9 Jun 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!