Problem 679. Alias abs to asb
Solution Stats
Problem Comments
-
1 Comment
James
on 15 May 2012
I'll take one of these for "spritnf" please...
Solution Comments
-
1 Comment
Brett Shoelson
on 14 May 2012
Your test suite is not a good one; you shouldn't declare asb to be global. Instead, you should just allow the function declaration to contain 'asb', as in:
function x = asb(x)
x = abs(x)
end
And do you _really_ think we should program MATLAB to try to fix your typos? That's a recipe for disaster!
Brett
Problem Recent Solvers28
Suggested Problems
-
Find all elements less than 0 or greater than 10 and replace them with NaN
14639 Solvers
-
Remove any row in which a NaN appears
7920 Solvers
-
113 Solvers
-
319 Solvers
-
652 Solvers
More from this Author260
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!