Is there a faster way to cube a array?
Mostra commenti meno recenti
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 Commenti
KSSV
il 12 Feb 2021
B = A.^3 ;
But looks what you have tried takes less time..
Ram Kishore Arumugam
il 12 Feb 2021
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Write C Functions Callable from MATLAB (MEX Files) in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!