Finding Corresponding Values In Cells
Mostrar comentarios más antiguos
Hello,
I just wanted to get an opinion on the best way to approach a problem. I am importing an excel sheet which contains numbers and strings using xlsread. From the created cell I want to find a numerical value in the first column and then print the corresponding value from the second column.
Any tips on which functions to run would be much appreciated.
Thanks, Ross
Respuestas (1)
Azzi Abdelmalek
el 25 de Mzo. de 2016
v={1 'a';2 'b';'s' 'e';1 'e' ;4 'z'}
idx=cellfun(@isnumeric,v(:,1))
out=v(idx,2)
1 comentario
Ross Westwood
el 25 de Mzo. de 2016
Categorías
Más información sobre Structures en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!