How many Fibonacci numbers?
Find the number of unique Fibonacci numbers (don't count repeats) in a vector of positive integers.
Example:
x = [1 2 3 4...
6 years ago
Solved
Triangle sequence
A sequence of triangles is constructed in the following way:
1) the first triangle is Pythagoras' 3-4-5 triangle
2) the s...
Fibonacci-Sum of Squares
Given the Fibonacci sequence defined by the following recursive relation,
* F(n) = F(n-1) + F(n-2)
* where F(1) = 1 and F(1)...
6 years ago
Solved
Fibonacci sequence
Calculate the nth Fibonacci number.
Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ...
Examples:
Inpu...
6 years ago
Solved
Monty Hall
The classic Monty Hall "Let's Make a Deal" final showcase puzzle pits the contestant against three Doors. Behind one Door are dr...
6 years ago
Question
Error: Live Editor Run Section
My scirpt has multiple sections. I intentially leave a few lines incomplete for demo purpose. When I run Section One, the erro...
6 years ago | 2 answers | 2
2
answers
Question
calling gradient multiple times
MATLAB suggests not to call gradient multiple times, but I did it for sin function. As shown in the figure, the first order der...