Problem 139. Determine if a Given Number is a Triangle Number
Solution Stats
Problem Comments
Solution Comments
-
1 Comment
Bob Lin
on 5 Nov 2019
Watch out! Martix size!
-
2 Comments
Lucinda King
on 11 Jan 2017
This works in Matlab but not here? It fails on Test 3, but when I use the same value of x and the same function in Matlab it works...
Jan Orwat
on 13 Jan 2017
Your output y is a row vector (or scalar), but in 3'rd test it should be a column vector. Predefine y first with the same size as x.
-
1 Comment
Ramoflaple
on 10 Jul 2015
good solution
Problem Recent Solvers352
Suggested Problems
-
2154 Solvers
-
984 Solvers
-
Create matrix of replicated elements
360 Solvers
-
Try 1.5.4: Celsius to Fahrenheit
743 Solvers
-
955 Solvers
More from this Author56
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!