Problem 2549. length of a vector
Find twice the length of a given vector.
Solution Stats
Problem Comments
-
2 Comments
Paul Bower
on 20 Jan 2025 at 20:21
For test case 2: x=[1 2 3]; shouldn't the answer be norm(x) which is approximately 3.74?
Christian Schröder
on 20 Jan 2025 at 21:13
"length" here refers to the number of elements - and yes, the problem description could be clearer.
Solution Comments
Show commentsProblem Recent Solvers737
Suggested Problems
-
Select every other element of a vector
33625 Solvers
-
Find all elements less than 0 or greater than 10 and replace them with NaN
15599 Solvers
-
478 Solvers
-
400 Solvers
-
Convert a Cell Array into an Array
1919 Solvers
More from this Author1
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!