3

I have a struct as shown below:

enter image description here

I have a problem with this struct. In some fields, instead of the values as in the other fields, it's written 48x1 uint32. I want to have to numbers as in the other fields, for example [23;45;67].

My problem is that I want to save the struct in a csv file, for then open it with python, and saving the struct as it is in the fields I need the values, instead of 48x1 uint32.

Ahinoa
  • 75
  • 7
  • Just as with other number-crunching programs (for instance Excel), MATLAB questions are on-topic for StackOverflow only if they involve programming. Just general point-and-click usage of the software would be on-topic at SuperUser. – Ben Voigt May 14 '17 at 17:05
  • Have a look at my edit also. – Robert Seifert May 18 '17 at 05:40

1 Answers1

2

It is not relevant if the data type is double or uint32, just the number of element matters. The maximum number of elements displayed in the variable browser is 10.

a.b = uint32(randi(20,10,1));   %// gets displayed
a.c = double(randi(20,10,1));   %// gets displayed
a.d = uint32(randi(20,11,1));   %// does not get displayed
a.c = double(randi(20,11,1));   %// does not get displayed

enter image description here

I'm not aware of any possibility to change this behavior.


My problem is that I want to save the struct in a csv file, for then open it with python, and saving the struct as it is in the fields I need the values, instead of 48x1 uint32.

The values are there, there is no difference in-between the rows. But if there are are less than 11 elements in an array you get a preview of the field content in the variable browser. But if you type patients(56) an patients(57) there is no difference in format.

Robert Seifert
  • 25,078
  • 11
  • 68
  • 113