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년 초과 전
문제를 풀었습니다
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년 초과 전
문제를 풀었습니다
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년 초과 전
문제를 풀었습니다
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년 초과 전
질문
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년 초과 전 | 답변 수: 2 | 2
2
답변
질문
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...