Conversion to string from struct is not possible.
84 次查看(过去 30 天)
显示 更早的评论
How to convert to double in order to address each data in this case?
3 个评论
Benjamin Thompson
2022-5-11
X.data is already a matrix of doubles. Maybe you can post a smaller problem and show the output or result you are looking for? Post code or a sample MAT file with the data.
回答(1 个)
Mitch Lautigar
2022-5-11
Couple ways to handle this. I'll explain the top 2.
1 - Pull the data out of the struct.
num_data = x.data;
str_data = x.textdata;
You can now change the type if you wish.
2 - Convert to a cell array/table
This will put everything into a single array/table. Though you might have to format it a little bit.
Hope it helps! If it doesn't, reply and i'll answer when I can.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Type Conversion 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!