matlab – 如何在变量浏览器中显示uint32数组的所有值?

我有一个结构如下所示:

《matlab – 如何在变量浏览器中显示uint32数组的所有值?》

我有这个结构的问题.在某些字段中,不是像其他字段中的值,而是写成48×1 uint32.我想要像其他领域一样使用数字,例如[23; 45; 67].

我的问题是我想在csv文件中保存结构,然后用python打开它,并保存结构,因为它在我需要值的字段中,而不是48×1 uint32.

最佳答案 如果数据类型是double或uint32,则只是元素数量的重要性是不相关的.变量浏览器中显示的最大元素数为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

《matlab – 如何在变量浏览器中显示uint32数组的所有值?》

我不知道有任何改变这种行为的可能性.

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.

值存在,行之间没有差异.但是,如果数组中的元素少于11个,则可以在变量浏览器中预览字段内容.但是如果你输入患者(56)和患者(57),那么格式就没有区别.

点赞