Risolto


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 ...

circa 10 anni fa

Risolto


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 = ...

circa 10 anni fa

Risolto


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...

circa 10 anni fa

Risolto


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 ...

circa 10 anni fa

Risolto


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...

circa 10 anni fa

Risolto


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...

oltre 10 anni fa

Risolto


Values in Array
How many values are in the array

oltre 10 anni fa

Risolto


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...

oltre 10 anni fa

Risolto


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...

oltre 10 anni fa

Risolto


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...

oltre 10 anni fa

Risolto


Transpose of matrix
Transpose of matrix as per test cases

oltre 10 anni fa

Risolto


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 ...

oltre 10 anni fa

Risolto


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

oltre 10 anni fa

Risolto


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...

oltre 10 anni fa

Risolto


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;...

oltre 10 anni fa

Risolto


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...

oltre 10 anni fa

Risolto


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...

oltre 10 anni fa

Risolto


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...

oltre 10 anni fa

Risolto


Identify the sequence
Given a row vector, x, return 1 if it is an arithmetic series, or 2 if it is a geometric series. If it is neither, return 0. ...

oltre 10 anni fa

Risolto


Does this dress make me look fat
For the input string "Does xyz make me look fat" output the string "No, xyz does not make you look fat"

oltre 10 anni fa

Risolto


RGB to CMYK
Convert an RGB code to the corresponding CMYK code for printing. The RGB input is a [1×3] double array between 0 and 1. ...

oltre 10 anni fa

Risolto


Fifteen Parity Check
The Matlab function fifteen initializes the 4x4 array with randperm(16), which produces 50% unsolvable puzzles. A <https://en.wi...

oltre 10 anni fa

Risolto


Circle area using pi
Given a circle's radius, compute the circle's area. Use the built-in mathematical constant pi.

oltre 10 anni fa

Risolto


Height of a right-angled triangle
Given numbers a, b and c, find the height of the right angled triangle with sides a and b and hypotenuse c, for the base c. If a...

oltre 10 anni fa

Risolto


Crunch that matrix!
You are given an M x N matrix. Write a script that will compress this matrix into an M x (N/3) matrix, where each of the terms ...

oltre 10 anni fa

Risolto


LMI Twins : Fuzzy Image matching
The image below from <http://logicmastersindia.com/2016/04P/ Logic Masters India Marathon 2016> is puzzle "Twins Co-Ordinates" w...

oltre 10 anni fa

Risolto


Approximate e
Given a and n, compute and approximation to f = a * e ^ n, without the use of exp, string operations, or floating point numbers....

oltre 10 anni fa

Risolto


Lambert's W
Matlab cody does not support lambertw. Try to create a lambert's w function yourself. Lambert's W is the function that solves...

oltre 10 anni fa

Risolto


Sum of logarithms
Given a vector, v, of real positive numbers, compute the sum, s, of the base-10 logarithms of the elements of v, without the use...

oltre 10 anni fa

Risolto


jumping astronauts
The surface gravity on the moon is approximately 2 m/s^2. Thats why an funny astronauts feels as light as a feather and jumps fr...

oltre 10 anni fa

Carica altro