Convert cell data type to single

29 vues (au cours des 30 derniers jours)
RuiQi
RuiQi le 24 Juin 2016
Modifié(e) : RuiQi le 24 Juin 2016
I have a cell each cell have array. I want to convert ALL to type single but i cannot. Matlab gives error
Conversion to single from cell is not possible.
My code
a = single(a)
some of the cells in a are empty but i do not want to change anything of that

Réponses (1)

Andrei Bobrov
Andrei Bobrov le 24 Juin 2016
cellfun(@single,a,'un',0)

Catégories

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