Problem 1972. Convert matrix to 3D array of triangular matrices
Solution Stats
Problem Comments
Solution Comments
-
1 Comment
Peter
on 3 Feb 2023 at 1:47
Tricky if you don't see the output pattern!
-
2 Comments
Lincoln Poon
on 18 Jan 2021
I keep failing the 'assert(isequal(x,xb))' part of the last test.
Can someone please give me some ideas on how to fix it?
Daigo
on 5 Jan 2022
Lincoln> I also had the same issue but figured out the cause. In my case, I was computing P by "P = uint8((-1+sqrt(8*M+1))/2);" but this causes a problem for a large M. After I modified it to "P = round((-1+sqrt(8*M+1))/2);", the error has been solved.
Problem Recent Solvers91
Suggested Problems
-
Sum all integers from 1 to 2^n
12231 Solvers
-
322 Solvers
-
ZigZag matrix with reflected format
171 Solvers
-
Find the index of n in magic(n)
210 Solvers
-
Spot the First Occurrence of 5
406 Solvers
More from this Author44
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!