Problem 624. Get the length of a given vector
Given a vector x, the output y should equal the length of x.
Solution Stats
Problem Comments
-
8 Comments
Show
5 older comments
Claudio Gelmi
on 19 Nov 2012
This problem requires more than one Test Suite...Please improve.
Aidan Guenther
on 12 Dec 2020
nice
Katharina Heitger
on 29 Nov 2021
The explanation of this problem is a bit confusing. It can mean, that one should compute the length of the array itself or the length of a vector in a coordinate system. I saw what was meant looking at the tests. But before I was confused.
Zachary Hill
on 13 Dec 2021
able to find the length using x = vector but code did not give the output the problem wanted
Terrian
on 13 Jul 2022
very quick!
Anjana Srivastava
on 13 Jul 2022
Very fun problem
Ajinkya
on 14 Oct 2022
nice
Nicklas Grønvall
on 7 Aug 2023
Haha, it took me a couple of minutes to fully understand that it was the vector's element length and not the vector's magnitude that was needed. -.-'
Solution Comments
Show comments
Problem Recent Solvers10778
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!