Problem 44083. First use of arrayfun() and anonymous function @(x)
Create an anonymous function using @(x) for a parabola equation for the given coefficients stored in s with
s(1)x2 + s(2)x + s(3).
Use arrayfun() to apply the parabola equation to each element in the array A.
Note: for , while , and eval are forbidden.
Have fun :o)
Solution Stats
Problem Comments
-
1 Comment
David Verrelli
on 23 Jun 2018
Pascal Wenger, I recommend that you employ "assessFunctionAbsence" — see
https://au.mathworks.com/help/coursework/ug/assessfunctionabsence.html — in your Test Suite to more robustly deal with tricks to sidestep intended solution.
Solution Comments
Show commentsProblem Recent Solvers65
Suggested Problems
-
Reverse the Words (not letters) of a String
458 Solvers
-
Return unique values without sorting
979 Solvers
-
Return the first and last characters of a character array
11204 Solvers
-
Determine if input is a perfect number
248 Solvers
-
Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
1969 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!