It looks like you want to access the datatype of signals added into your BaseWorkSpace.
Lets consider if signal "a", "b", "c" are added into BaseWorkSpace then, Simply you can do this..
listOfSignals = who;
ListOfDataType = {'Signal Names', 'DataType'};
for i=2:length(listOfSignals)+1
ListOfDataType{i,1} = listOfSignals{i-1};
ListOfDataType{i,2} = eval([listOfSignals{i-1},'.DataType']);
end
To check the list of DatatType.. Type this..
OutPut will be..
ListOfDataType =
'Signal Names' 'DataType'
'a' 'auto'
'b' 'boolean'
'c' 'fixdt(1,16,0.100000,-0.000000)'
Please Note:
1. While running this code.. make sure, only Simulink Signals\Parameters are present in your Base Workspace.. if your BaseWorkSpace contains any other type of dataobjects, (which dont have the property called 'DataType') then it may cause an error.. So to resolve such error, you may have to apply such if condition under this For Loop...
2. If you have dont have Signals present in BaseWorkSpace OR different Requirement, then this code will not work.. So let me know your requirement in details, like, from where you accessing these Signals ?