I'm confused by this problem. It requires the use of diff() and asks for differentiation, but it tests for equality with the input variable...
the author had proposed lots of questions with meaningless test. i despise this behavior
I understood this set of problems. The author wants us to use a function on x and then recover the original x (therefore an identity). However, It would be probably better if the test suite gave us the modified x (with additional necessary parameters) and demanded the original. That goes for all his problems of this kind.
Gareth, my guess is that he is not doing this on purpose, he only needs to improve his test suite. Currently it is very easy to give a phony solution.
For instance a better problem description would be return the ORIGINAL x after differentiating it.
Find all elements less than 0 or greater than 10 and replace them with NaN
13140 Solvers
Determine if a Given Number is a Triangle Number
326 Solvers
Remove the two elements next to NaN value
418 Solvers
Switch matrix to a column vector
264 Solvers
find the surface area of a cube
345 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!