This is the same as Problem 12.
This solution returns f(0) = 1, which contradicts the decription of the given problem.
This solution uses filter from the Signal Processing Toolbox.
Yes, it uses filter, but filter is indeed not a toolbox function, but a built-in function. You can fix the error by changing f=y(n-2) to f = y(n)
... and then change first input of filter to [1,-1] and remove +1 from the end of the line.
Test suite is flawed. I had to add a round(x,0) function to the output to make it pass.
Test is correct. Fibonacci Numbers are integers, so your output should be to.
Make a checkerboard matrix
Permute diagonal and antidiagonal
05 - Vector Equations 2
07 - Common functions and indexing 2
MATLAB Basic: rounding III
Numerical differentiation with high precision
[Thermodynamics] Polynomial fitting of heat capacity data
[Thermodynamics] Estimate boiling point of n-alkanes
Volume of a truncated cube
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