Effacer les filtres
Effacer les filtres

Taking a value from within a double and displaying it next to that cell?

1 vue (au cours des 30 derniers jours)
matla6123
matla6123 le 5 Avr 2017
Réponse apportée : KSSV le 5 Avr 2017
I am wondering if the following is possible.
I have a vector of doubles, all ranging in different sizes...
4x8 double
2x8 double
1x8 double
3x8 double...
I want to take the total of the last column in each double and put these into a vector.

Réponses (1)

KSSV
KSSV le 5 Avr 2017
A{1} = rand(4,8) ;
A{2} = rand(2,8) ;
A{3} = rand(1,8) ;
A{4} = rand(3,8) ;
Aend = cell2mat(cellfun(@(x) sum(x(:,end)), A, 'UniformOutput', false)) ;

Catégories

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