How to read mpt.parameter present in workspace

2 visualizaciones (últimos 30 días)
V Manohar
V Manohar el 9 de Jun. de 2020
Comentada: Walter Roberson el 9 de Jun. de 2020
  3 comentarios
V Manohar
V Manohar el 9 de Jun. de 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

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Workspace Variables and MAT-Files en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by