Effacer les filtres
Effacer les filtres

How transform cell to logical?

30 vues (au cours des 30 derniers jours)
Daniela Correa
Daniela Correa le 26 Avr 2018
Modifié(e) : Birdman le 26 Avr 2018
Hello, I have this cell ->
test =
Columns 1 through 15
[] [] [70] [] [] [70] [] [] [70] [] [] [71] [] [] [72]
Columns 16 through 30
[] [] [72] [] [] [72] [] [] [72] [] [] [72] [] [] [72] ...........
and I would like to tranform this cell in a logical. I want to read just the cells with the numbers, that go 3 by 3 cells.
Thanks

Réponses (1)

Birdman
Birdman le 26 Avr 2018
Modifié(e) : Birdman le 26 Avr 2018
Do you want to convert the elements with number to true? Try this:
test(cellfun(@(x) ~isempty(x),test))={true}
Note that you can not directly assign logical value to the specified elements of cell.

Catégories

En savoir plus sur Data Types 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