Margaret Hoeller
2019년부터 활동
Followers: 0 Following: 0
Feeds
문제를 풀었습니다
Find a subset that divides the vector into equal halves
Given a vector x, return the indices to elements that will sum to exactly half of the sum of all elements. Example: Inpu...
거의 5년 전
문제를 풀었습니다
How long is the longest prime diagonal?
Stanislaw Ulam once observed that if the counting numbers are <http://en.wikipedia.org/wiki/Ulam_spiral arranged in a spiral>, t...
거의 5년 전
문제를 풀었습니다
Find the biggest empty box
You are given a matrix that contains only ones and zeros. Think of the ones as columns in an otherwise empty floor plan. You wan...
거의 5년 전
문제를 풀었습니다
(Linear) Recurrence Equations - Generalised Fibonacci-like sequences
This problem is inspired by problems <http://uk.mathworks.com/matlabcentral/cody/problems/2187-generalized-fibonacci 2187>, <htt...
거의 5년 전
문제를 풀었습니다
Fibonacci Decomposition
Every positive integer has a unique decomposition into nonconsecutive Fibonacci numbers f1+f2+ ... Given a positive integer n, r...
거의 5년 전
문제를 풀었습니다
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...
거의 5년 전
문제를 풀었습니다
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)...
거의 5년 전
문제를 풀었습니다
Number of Even Elements in Fibonacci Sequence
Find how many even Fibonacci numbers are available in the first d numbers. Consider the following first 14 numbers 1 1 2...
거의 5년 전
문제를 풀었습니다
Project Euler: Problem 2, Sum of even Fibonacci
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 te...
거의 5년 전
문제를 풀었습니다
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...
거의 5년 전
문제를 풀었습니다
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...
거의 5년 전
문제를 풀었습니다
Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...
거의 5년 전
문제를 풀었습니다
Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...
거의 5년 전
문제를 풀었습니다
Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...
거의 5년 전
문제를 풀었습니다
Find similar sequences
Another problem inspired by a question on the <http://www.mathworks.com/matlabcentral/answers answers> forum. Given a matrix ...
거의 5년 전
문제를 풀었습니다
Approximation of Pi (vector inputs)
Pi (divided by 4) can be approximated by the following infinite series: pi/4 = 1 - 1/3 + 1/5 - 1/7 + ... For a given numbe...
거의 5년 전
문제를 풀었습니다
geometric progression
I've modified my <http://uk.mathworks.com/matlabcentral/cody/problems/2800-arithmetic-progression previous program> so that it n...
거의 5년 전
문제를 풀었습니다
arithmetic progression
I've written a program to generate the first few terms of <https://en.wikipedia.org/wiki/Arithmetic_progression arithmetic progr...
거의 5년 전
문제를 풀었습니다
Approximation of Pi
Pi (divided by 4) can be approximated by the following infinite series: pi/4 = 1 - 1/3 + 1/5 - 1/7 + ... For a given numbe...
거의 5년 전
문제를 풀었습니다
Generate Square Wave
Generate a square wave of desired length, number of complete cycles and duty cycle. Here, duty cycle is defined as the fraction ...
거의 5년 전
문제를 풀었습니다
Sum of series VII
What is the sum of the following sequence: Σ(km^k)/(k+m)! for k=1...n for different n and m?
거의 5년 전
문제를 풀었습니다
Sum of series VI
What is the sum of the following sequence: Σk⋅k! for k=1...n for different n?
거의 5년 전
문제를 풀었습니다
Sum of series V
What is the sum of the following sequence: Σk(k+1) for k=1...n for different n?
거의 5년 전
문제를 풀었습니다
Sum of series IV
What is the sum of the following sequence: Σ(-1)^(k+1) (2k-1)^2 for k=1...n for different n?
거의 5년 전
문제를 풀었습니다
Sum of series III
What is the sum of the following sequence: Σ(2k-1)^3 for k=1...n for different n?
거의 5년 전
문제를 풀었습니다
Sum of series II
What is the sum of the following sequence: Σ(2k-1)^2 for k=1...n for different n?
거의 5년 전
문제를 풀었습니다
Sum of series I
What is the sum of the following sequence: Σ(2k-1) for k=1...n for different n?
거의 5년 전
문제를 풀었습니다
Circular Primes (based on Project Euler, problem 35)
The number, 197, is called a circular prime because all rotations of the digits: 197, 971, and 719, are themselves prime. The...
거의 5년 전
문제를 풀었습니다
Mersenne Primes vs. All Primes
A Mersenne prime (M) is a prime number of the form M = 2^p - 1, where p is another prime number. <https://www.mathworks.com/matl...
거의 5년 전