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.
Alphabetize by last name
Is the Point in a Circle?
kmph to mps
multiply by three
Given the variable x as your input, multiply it by four, then divide it by two. Then put the result in y.
Find the diagonal of the square of side L
Non trivial identities - flipping
Non trivial identities - reshape
A shooting competition
Performance - summation
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office