Is there a faster way to cube a array?
Afficher commentaires plus anciens
Hi everyone
I have an array A whose size is 80000 x 4 x 4.
In order to calculate the cube of each element of A, I am doing
B=A.*A.*A;
Is there a faster way to calculate the cube of each element? Thanks in advance,
2 commentaires
KSSV
le 12 Fév 2021
B = A.^3 ;
But looks what you have tried takes less time..
Ram Kishore Arumugam
le 12 Fév 2021
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Operators and Elementary Operations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!