Effacer les filtres
Effacer les filtres

Conversion to string from struct is not possible.

77 vues (au cours des 30 derniers jours)
Wei Kang Cheng
Wei Kang Cheng le 11 Mai 2022
How to convert to double in order to address each data in this case?
  3 commentaires
Wei Kang Cheng
Wei Kang Cheng le 11 Mai 2022
how to solve this?
Benjamin Thompson
Benjamin Thompson le 11 Mai 2022
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.

Connectez-vous pour commenter.

Réponses (1)

Mitch Lautigar
Mitch Lautigar le 11 Mai 2022
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.

Catégories

En savoir plus sur Data Type Conversion dans Help Center et File Exchange

Produits


Version

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by