A résolu


Arc length of points interpolation
Given a n by m matrix representing m vectors in n dimensions. Calculate the <https://en.wikipedia.org/wiki/Arc_length arc length...

plus de 9 ans il y a

A résolu


surrounded centroid
create a [n*n] matrix. n must be odd number. its centroid is n which is surrounded by n-1. example: surround(5)= 1 2 ...

plus de 9 ans il y a

A résolu


"Bubblegum, Bubblegum, in a dish; How many pieces do you wish?"
The child's game "bubblegum, bubblegum, in a dish; how many pieces do you wish?" is a way of eliminating players until a single ...

plus de 9 ans il y a

A résolu


Sort rows of a matrix
Sort rows of matrix A in an ascending order according to the last column Example input: A = [1 2 3;7 8 9;4 5 6]; Exam...

plus de 9 ans il y a

A résolu


Create cotangent function out of sine.
Please, don't use cos, tan, cot matlab functions.

plus de 9 ans il y a

A résolu


4 Digit Sequence Repetitions
Given a 4 digit integer, a sequence can be created such that the next digit in the sequence is the ones digit from the sum of th...

plus de 9 ans il y a

A résolu


Calculate the centroid of a triangle
Info: https://en.wikipedia.org/wiki/Centroid Example Input: x = [0 0 1]; % x-coordinate y = [0 1 0]; % y-coordinat...

plus de 9 ans il y a

A résolu


Euclidean distance from a point to a polynomial
A not uncommon problem in the area of computational geometry is to find the closest point to a straight line from a given point,...

plus de 9 ans il y a

A résolu


Find the sides of an isosceles triangle when given its area and height to its base.
Find the sides of an isosceles triangle when given its area and height to its base. Example S=12, h=4, result will be [5 5 6]...

plus de 9 ans il y a

A résolu


Find Pseudo-Cyclic Number
A cyclic number is an integer in which cyclic permutations of the digits are successive multiples of the number https://en.wikip...

plus de 9 ans il y a

A résolu


Avengers Assemble!
Given matrix with so many zeroes, trim those zeroes and output a matrix joining all nnz elements Example: input = [0 0 0 0 0...

plus de 9 ans il y a

A résolu


Bubble sort
Write your own bubble sort function ( <https://en.wikipedia.org/wiki/Bubble_sort>) to sort all elements in x in ascending order....

plus de 9 ans il y a

A résolu


Weighted Convolution
Given two input vectors x = [x_1, x_2, ..., x_K] and y = [y_1, y_2, ..., y_K] of equal length, compute the weighted convolution ...

plus de 9 ans il y a

A résolu


Sum of digits of powers of 2
Given n, first, calculate the number 2^n. Then, sum the digits that comprise that number. For example: Input: n = 7 2^n = ...

plus de 9 ans il y a

A résolu


Sums of cubes and squares of sums
Given the positive integers 1:n, can you: 1. Compute twice the sum of the cubes of those numbers. 2. Subtract the square...

presque 10 ans il y a

A résolu


Zero Cross
Can you write a function counts the number of times(n) a signal(x) crosses zero or changes sign. Example x=[1 2 -3 -4 5 ...

presque 10 ans il y a

A résolu


Find the inverse permutation
Given a permutation vector perm (a vector of n elements containing all the elements from 1 to n in some order), return the permu...

presque 10 ans il y a

A résolu


Nth roots of unity
First, find the n nth roots of unity. eg if n = 6, find the n distinct (complex) numbers such that n^6 = 1. <https://en.wiki...

presque 10 ans il y a

A résolu


Values in Array
How many values are in the array

presque 10 ans il y a

A résolu


How Far Can You Throw Something?
As you probably learned in your high school physics class, throwing an object at a 45 degree angle will give you the maximum ran...

presque 10 ans il y a

A résolu


Counting the Grand Primes
A grand prime pair is a pair of primes, p1 and p2=p1+1000, such that both numbers are prime. Like a twin prime pair, where the d...

presque 10 ans il y a

A résolu


Pseudo Square Root (Inspired by Project Euler 266)
Shamelessly copied from the Project Euler page for Problem 266: ------------- The divisors of 12 are: 1,2,3,4,6 and 12. T...

presque 10 ans il y a

A résolu


Transpose of matrix
Transpose of matrix as per test cases

presque 10 ans il y a

A résolu


Differential equation and events
You have to solve the non-linear time variant differential equation: (cos(y)+2)*y''+atan(y)*sin(0.01*t)^2+y*sin(0.5*t)=0 ...

presque 10 ans il y a

A résolu


Find the sum of n squares
What is the sum of the squares of the first n integers?

presque 10 ans il y a

A résolu


Block average
Given a matrix, calculate the block average of each disjoint sub-matrix of the same size. Assume that the size of the matrix alo...

presque 10 ans il y a

A résolu


Rotate Matrix @180 degree
Rotate Matrix @180 degree Example A=[8 1 6; 3 5 7; 4 9 2], then answer would be [2 9 4;...

presque 10 ans il y a

A résolu


Assignment Problem
Given a matrix where row i corresponds to person i, and column j corresponds to task j and cell (i,j) corresponds to the time ta...

presque 10 ans il y a

A résolu


Frobenius McNugget Factorization
Mr. Frobenius McNugget is a peculiar man. As you might expect, he likes to eat Chicken McNuggets. But his love of number the...

presque 10 ans il y a

A résolu


Replace values out of an interval with the lower or upper values
For a vector or matrix X and an interval [n1,n2], the function replace every element of x inferior to n1 by n1, and every elemen...

environ 10 ans il y a

Charger plus