Risolto


Mongean Shuffle
A Mongean shuffle of an n card deck starts with putting the initial deck on the left hand side. * The top card of the deck is...

oltre 8 anni fa

Risolto


create a square matrix
create a [n*n] matrix. example: mat(4)= [ 1 4 9 16 4 4 9 16 9 9 ...

oltre 8 anni fa

Risolto


Number of occurrences of letter in a text
Given an input text either as a string or as a cell array of strings, return a (1 x 26) matrix containing the number of occurren...

oltre 8 anni fa

Risolto


Multiply two polynomials p and q given in in vector representation.
Multiply two polynomials p and q given in vector representation. Example p=[-2 0 1 -1 3 2] q=[1 0 -1 2 ...

oltre 8 anni fa

Risolto


Find the diagonal of the square of side L
You are given a square of side length L, find D the length of its diagonal.

oltre 8 anni fa

Risolto


Create vector as shown in test cases
Create vector as shown in test cases

oltre 8 anni fa

Risolto


determine if
determine if the elements of a matrix is a nan and return true

oltre 8 anni fa

Risolto


Matrix element wise multiplication
Take two incoming vectors, and multiply them element wise

oltre 8 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 8 anni fa

Risolto


Find my daddy long leg (No 's')
Given the ratio of the two legs (longer / shorter), and the hypotenuse length, find the value of the bigger leg.

oltre 8 anni fa

Risolto


prime to each other
Given two integers n1, n2 greater than 1, find out if they have common divisors or are prime to each other. Return "true" if the...

oltre 8 anni fa

Risolto


Weighted average
Compute the weighted average Y, of the vector A, given the weight vector W. The weighted average is the sum of the dot produc...

oltre 8 anni fa

Risolto


Calculate correlation.
There are two data. y1=[0 1 2 3 4]' y2=[2 3 4 5 6]' We can see positive relationship between y1 and y2. The relations...

oltre 8 anni fa

Risolto


Select primes from the matrix.
Select primes from the matrix.

oltre 8 anni fa

Risolto


Global usage
This Challenge is to utilize Global variables. Global variables are risky as the subroutine may inadvertently and unwantingly...

oltre 8 anni fa

Risolto


Find the sum of the largest two elements in a vector
With this one, you have to find the two largest elements in a vector and output the sum of those numbers.

oltre 8 anni fa

Risolto


How many unique Pythagorean triples?
For a given integer |n|, return all <https://en.wikipedia.org/wiki/Pythagorean_triple Pythagorean triples> that inlude numbers s...

oltre 8 anni fa

Risolto


Make blocks of color
Given a (Nx3) sequence of RGB colors, I want to create a (numRowBlocks x numColBlocks x 3) image comprising (blockSize x blockSi...

oltre 8 anni fa

Risolto


Knight's Tour Checker
Given a matrix a, determine whether or not a legal <http://en.wikipedia.org/wiki/Knight's_tour knight's tour> is present. The kn...

oltre 8 anni fa

Risolto


Find the next square number
Given one or more integers n, find the next integer that is a square, for each of them. Example 1: n = 1; out = 4; ...

oltre 8 anni fa

Risolto


Chicken Race
2 chickens, Pete and Fred, compete in a 100 meter race. Pete runs at a velocity of vp meter/second and Fred is slower, running ...

oltre 8 anni fa

Risolto


Get derivarive of polynomial given as vector array.
Get derivarive of polynomial given as vector array. Example p=[ 1 2 0 5 0 3 ]; result=[ 5 8 0 10 ...

oltre 8 anni fa

Risolto


intervals
Write a function that takes an interval from a to b, and divides it into 6 parts.

oltre 8 anni fa

Risolto


Calculate the hypotenuse of a right triangle without using ^ and sqrt ()
Find out the hypotenuse of right triangle. Say a = 4, b = 3 then c = 5 Please don't use ^ and sqrt() function.

oltre 8 anni fa

Risolto


Find two triangular numbers whose sum is input.
Find two triangular numbers whose sum is _input_. Note: The difference beetween the triangular numbers should be minimum.

oltre 8 anni fa

Risolto


Find Missing Number
A little problem (inspired by CodeChef) for the coffee break. A friend give you an array of size n-1 integers and these int...

oltre 8 anni fa

Risolto


Numeric array to cell array of strings (easy)
Given a numeric array (A) and a 1xk cell array of strings (C), return a cell array (B) that is the same size as A and in which e...

oltre 8 anni fa

Risolto


Add the even numbers
Add only the even numbers of x example: x = [1 2 3 4 5] the positive numbers are: 2 4, so their sum is 6

oltre 8 anni fa

Risolto


DC-DC boost converter
Find the output voltage of a DC-DC boost converter when its input voltage is 12V and the duty cycle ratio is 0.6.

oltre 8 anni fa

Risolto


Free-time Equation
Given a 7-day week, an *_nc_* -number of *_tc_* -hour classes, *_ta_* -hours awake in a day, and *_tw_* -hours that you work in ...

oltre 8 anni fa

Carica altro