MATLAB Answers

How to read mpt.parameter present in workspace

5 views (last 30 days)
V Manohar
V Manohar on 9 Jun 2020
Commented: Walter Roberson on 9 Jun 2020

  3 Comments

V Manohar
V Manohar on 9 Jun 2020
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


Translated by