Is there a faster way to cube a array?
Show older comments
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 Comments
KSSV
on 12 Feb 2021
B = A.^3 ;
But looks what you have tried takes less time..
Ram Kishore Arumugam
on 12 Feb 2021
Accepted Answer
More Answers (0)
Categories
Find more on Operators and Elementary Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!