Feeds
已解决
Laws of motion 4
Given the initial velocity 'u', final velocity 'v' and acceleration 'a', find the distance travelled.
1 month 前
已解决
Easy Sequences 10: Sum of Cumsums of Fibonacci Sequence
The function F(n) is defined as the set of Fibonacci numbers from the first up to the n-th. S(n) is the result of applying to F,...
1 month 前
已解决
"Look and say" sequence
What's the next number in this sequence? * [0] * [1 0] * [1 1 1 0] * [3 1 1 0] * [1 3 2 1 1 0] This a variant on the w...
1 month 前
已解决
Sum of first n terms of a harmonic progression
Given inputs a, d and n, return the sum of the first n terms of the harmonic progression a, a/(1+d), a/(1+2d), a/(1+3d),....
1 month 前
已解决
Return the Fibonacci Sequence
Write a code which returns the Fibonacci Sequence such that the largest value in the sequence is less than the input integer N. ...
1 month 前
已解决
Find the stride of the longest skip sequence
We define a _skip sequence_ as a regularly-spaced list of integers such as might be generated by MATLAB's <http://www.mathworks....
1 month 前
已解决
Project Euler: Problem 6, Natural numbers, squares and sums.
The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ...
1 month 前
已解决
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...
1 month 前
已解决
Fill a zeros matrix
The aim is to fill an array of all zeros given a numerical value and the index of row and columns for this value. 3 Inputs: ...
1 month 前
已解决
Create logical matrix with a specific row and column sums
Given two numbers *|n|* and *|s|*, build an |n-by-n| logical matrix (of only zeros and ones), such that both the row sums and th...
1 month 前
已解决
We love vectorized solutions. Problem 1 : remove the row average.
Given a 2-d matrix, remove the row average from each row. Your solution MUST be vectorized. The solution will be tested for ac...
1 month 前
已解决
Replicate elements in vectors
Replicate each element of a row vector (with NaN) a constant number of times. Examples n=2, A=[1 2 3] -> [1 1 2 2 3 3] n=0...
1 month 前
已解决
Generate N equally spaced intervals between -L and L
Given N and L, return a list of numbers (in ascending order) that divides the interval [-L L] into N equal-length segments. For...
1 month 前
已解决
intersection of matrices
Given two matrices filled with ones and zeros, determine if they share a common row, column entry. These matrices are of identic...
1 month 前
已解决
Return a list sorted by number of consecutive occurrences
Inspired by Problem 38 by Cody Team. Given a vector x, return a vector y of the values in x sorted by the number of CONSECUTIVE ...
1 month 前
已解决
Return unique values without sorting
If the input vector A is [42 1 1], the output value B must be the unique values [42 1] The values of B are in the same order a...
1 month 前
已解决
First non-zero element in each column
For a given matrix, calculate the index of the first non-zero element in each column. Assuming a column with all elements zero i...
1 month 前
已解决
Getting the indices from a matrix
Inspired by Problem 645. Getting the indices from a matrix. Given a matrix A (or a vector), return the indices (always in row...
1 month 前
已解决
Construct an index vector from two input vectors in vectorized fashion
Create an index vector defined by two input vectors, one defining the beginnings of one or more index ranges, and the other defi...
1 month 前
已解决
Longest run of consecutive numbers
Given a vector a, find the number(s) that is/are repeated consecutively most often. For example, if you have a = [1 2 2 2 1 ...
1 month 前
已解决
Piecewise linear interpolation
Given an Mx2 vector and a row of M-1 integers, output a two column vector that linearly interpolates Y times between each succes...
1 month 前
已解决
Basic Mathematics 2
If a 4’ x 8’ sheet of ½” plywood weighs W lbs and you cut an L” x L” robot base from this material, approximately how much weigh...
1 month 前
已解决
Basic Mathematics 1
If a robot is traveling on a north heading at v1 inches per second and has the ability to only make N degree changes in directio...
1 month 前
已解决
Linear Motion 7
A robot has a maximum rate of acceleration of a m/s2. If the robot starts from rest and reaches a velocity of v2 m/s. How far ha...
1 month 前
已解决
Linear Motion 6
An experimental vehicle traveling at v1 m/s is brought to a full stop in t seconds. How far does it travel before stopping? Roun...
1 month 前


