已解决


Harmonic series counting
The function takes a positive limit as input, And counts how many terms must be summed in the harmonic series: 1/1, 1/2, 1/3, ...

1 year 前

问题


Sequence Vectorization - II
This is the second part to the question - Sequence Vectorization - I Given an array of Natural numbers, N, return the sequence ...

1 year 前 | 2 | 7 个解题者

已解决


Sequence Vectorization - I
Given a Natural number N, return the sequence - [1 1 2 1 2 3 1 2 3 4 ... 1 2 3 ... N-3 N-2 N-1 N] i.e. the concatenation of (1:k...

1 year 前

已解决


Find gradient of a numeric data which has same size as the existing vector.
**** Refer matlab documentation about finding gradient **** Convert the entire gradient vector to least integer form. (Probably...

1 year 前

问题


Sequence Vectorization - I
Given a Natural number N, return the sequence - [1 1 2 1 2 3 1 2 3 4 ... 1 2 3 ... N-3 N-2 N-1 N] i.e. the concatenation of (1:k...

1 year 前 | 2 | 11 个解题者

已解决


Get the area codes from a list of phone numbers
Given a string of text with phone numbers in it, return a unique'd cell array of strings that are the area codes. s = '508-647...

1 year 前

已解决


Fun with permutations
There are factorial(N) permutations of the numbers from 1 to N. For each of these permutations, we can find the set of indexes j...

1 year 前

已解决


Identify de Polignac numbers
The numbers 125 and 329 can be written as the sum of a prime and a power of 2. For example, , and . The numbers 127 and 331, whi...

1 year 前

已解决


Solve an ODE: draining tank
Write a function to compute the time to drain a cylindrical tank of diameter from an initial level to a level . The outflow oc...

1 year 前

已解决


Inscribe a circle in a triangle with a side of length equal to the circle’s circumference
A circle of radius is inscribed in a triangle with a side that has a length equal to the circle’s circumference. The center of ...

1 year 前

已解决


Convert vector of strings to lower triangular matrix
Given a non-empty vector vec of strings, please put its elements into the lower triangular half of a square matrix M column-wise...

1 year 前

已解决


Zero finder
Write a function named 'zero_finder' that takes a matrix as input and returns the row index of the last zero for each for each c...

1 year 前

已解决


Radius of an inner N-dimensional sphere
A hypercube is an N-dimensional analogue of a square (N=2). Similarly, an N-sphere is an N-dimensional analogue of a circle. Not...

1 year 前

已解决


Easy Sequences 100: One-line Code Challenge - 100th Digit of 100th power of an Integer
Given a integer , write a function that computes the digit of . If has less than digits just output a NaN. For example if , ...

1 year 前

已解决


2 b | ~ 2 b
Given a string input, output true if there are 2 b's in it, false if otherwise Examples: 'Macbeth' -> false 'Publius Cornelius...

1 year 前

已解决


Easy Sequences 98: One-line Code Challenge - Ternary Operator Function
Ternary operation is a standard construct in most computer languages. The ternary operator assigns value to a variable depending...

1 year 前

已解决


Find the quantization index of an analog value using a 6-bit quantizer.
Given a sinusoidal waveform x(t)=4.5*sin(2*pi*100*t) is sampled at 8000 sample per second. Assume that signal range is between -...

1 year 前

已解决


Make an N-dimensional Multiplication Table
*INSTRUCTIONS* This is a multi-dimensional variant of the normal multiplication table used to teach elementary students multi...

1 year 前

已解决


Compute Khinchin's constant
Khinchin's constant K_0 = 2.684542001... (also written "Khintchine's constant") has the amazing property that it is the limiting...

1 year 前

已解决


Logic 2

1 year 前

已解决


Logic 12

1 year 前

已解决


Logic 5

1 year 前

已解决


An array is given. Find the unique elements of the array. [keep the sequence unchanged]
An array is given. Find the unique elements of the array. [keep the sequence unchanged] For example if input x=[2 ,4 , 9 ,2 ,...

1 year 前

已解决


A Binary Search
One way to locate a target value in a sorted array, is to use a binary search algorithm. Here, you test if the midpoint in the a...

1 year 前

已解决


Index of a Rational number
The set of real numbers are infinite. They are so many that real numbers can't even be enumerated. However, unlike real numbers ...

1 year 前

已解决


nth Rational Number
Return the nth rational number. This is the inverse to Problem 1471. Index of a Rational number The first ten positive rationa...

1 year 前

已解决


Distance between two GPS Coordinates
A problem that arises when performing geographically weighted regression is determining the distance between GPS coordinates. GI...

1 year 前

已解决


Full combinations
Given n input vectors x1, x2, …, xn, generate a p*n matrix y whose rows contain all element-wise combinations of the vectors x1,...

1 year 前

已解决


Perl 2: pop
This is part of a series of perl function which were very helpful for many perl programmers. Could you implement it in Matlab? ...

1 year 前

加载更多