Getting data from structure
Show older comments
Hello, I'm using dSPACE to output the results to Matlab. The data comes out as a structure with the variables nested inside. That is fine, but the variable names have spaces in them and I'm not sure how to get the data. And no I cannot change the name of the variables because that is what dSpace/Simulink assign them.
It looks like this:
>> A
A = Platform_HostService: [1x1 struct]
>> A.Platform_HostService
ans =
xAxis: [1x1000 double]
Model Root/Pulse_Generator/Out1: [1x1000 double]
... and so on.
I can't write A.Platform_HostService.Model Root... how do take care of the white space?
Thanks
2 Comments
Walter Roberson
on 28 Feb 2012
There is a hack for this, but I do not recall at the moment whether James or Jan maintain the code.
Which MATLAB version are you using? The easy of hacking it depends on the MATLAB version.
Ryan0101
on 29 Feb 2012
Accepted Answer
More Answers (0)
Categories
Find more on App Building in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!