From cell array to matrix

4 vues (au cours des 30 derniers jours)
Felipe Rios
Felipe Rios le 11 Déc 2019
Commenté : Adam Danz le 11 Déc 2019
Hello Everyone: I need to convert the variables (10 temperature profiles collected with a CTD) contained inside a cell array (rsk.mat herein attached) to ten single arrays. Please could anyone provide a hint as to how to accomplish this?
Cheers,
Felipe
  3 commentaires
Adam Danz
Adam Danz le 11 Déc 2019
Felipe Rios's answer moved here as a comment.
Hi Adam: rsk.data contains the values for the 10 profiles I need to convert to single matrix for each profile.
Thanks,
Felipe
Adam Danz
Adam Danz le 11 Déc 2019
Glad I could help!

Connectez-vous pour commenter.

Réponse acceptée

Adam Danz
Adam Danz le 11 Déc 2019
Modifié(e) : Adam Danz le 11 Déc 2019
This produces a 100x10 matrix and can be applied to several fields of rsk.data.
tstamp = [rsk.data.tstamp];
For fields that contain non-numeric data,
direction = {rsk.data.direction};
  1 commentaire
Adam Danz
Adam Danz le 11 Déc 2019
Felipe Rios's answer moved here as a comment
Thanks a lot Adam; profiles = [rsk.data.values] is what I needed!
I appreciate your help.
Cheers,
Felipe

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by