Effacer les filtres
Effacer les filtres

Extract data from 800x11 cell to column vector

3 vues (au cours des 30 derniers jours)
Owen Gray
Owen Gray le 18 Jan 2021
Commenté : Owen Gray le 19 Jan 2021
Basically I have an 800x11 cell containing either empty [], text or a scalar value. I am trying to extract the scalar values =/0 from the 6th column and store them in a column vector. I'd then also like to take all of the values = 0 and store them in a column vector also.
This is what I've produced so far, apologies it's my first time ever using Matlab
  4 commentaires
Adam Danz
Adam Danz le 18 Jan 2021
Modifié(e) : Adam Danz le 18 Jan 2021
Try
% cell named sesl_results
col = 6; % column 6
idx = cellfun(@(c)isscalar(c) && isnumeric(c) && c>0, sesl_results(:,col));
z = [sesl_results{idx,col}];
Owen Gray
Owen Gray le 19 Jan 2021
Thank you so much for all the help! @Adam Danz this worked perfectly, greatly appreciate it!

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Interactive Control and Callbacks dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by