Resuelto


ZigZag matrix with reflected format
ZigZag MATRIX with REFLECTED format. We have only input x. We have to create a matrix in the following pattern. input n=5...

casi 10 años hace

Resuelto


Non-zero bits in 10^n.
Given an integer that is a power of 10, find the number of non-zero bits, k, in its binary representation. For example: * ...

casi 10 años hace

Resuelto


matrix zigzag
Unfold a 2-D matrix to a 1-D array in zig-zag order, e.g., for matrix [ 1 2 3 ; 4 5 6 ; 7 8 9 ] the resulting 1-...

casi 10 años hace

Resuelto


Three grind is shipsstraigt
A function that returns either 'Rock', 'Scissors', or 'Paper' (string). You may succeed or you may fail the (case insensitive) t...

casi 10 años hace

Resuelto


Project Euler: Problem 16, Sums of Digits of Powers of Two
2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 2^N? Thanks ...

casi 10 años hace

Resuelto


Project Euler: Problem 9, Pythagorean numbers
A Pythagorean triplet is a set of three natural numbers, a b c, for which, a^2 + b^2 = c^2 For example, 3^2 + 4^2 =...

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


Polygonal numbers
The task of <http://www.mathworks.co.uk/matlabcentral/cody/problems/5 Problem 5> is to calculate triangular numbers. By playing ...

casi 10 años hace

Resuelto


Remove all the columns contains only zero
Remove the column from the matrix which has only zeros . Refer the Example below a= 1 0 3 0 23 0 56 0 1 ...

casi 10 años hace

Resuelto


ESEMPIO
controllo uso funzioni

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


Solve cosine without cos(x)
Solve cos(x). The use of the function cos() and sin() is not allowed.

casi 10 años hace

Resuelto


Solve sin(x) without sin(x)
Calculate y = sin(x) x = 0 -> y= 0 without the use of sin(x) or cos(x)

casi 10 años hace

Resuelto


2D Indexes
Given in input the maximum degree P, the algorithm furnishes a ordered list of two dimensional vectors [i,j] i,j>=0 such that i+...

casi 10 años hace

Resuelto


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.

casi 10 años hace

Resuelto


Finding two missing number in 1 to n array
You are given an array of numbers from 1 to n with two missing numbers. Return the two missing numbers. Input: x=[5 2 0 1 ...

casi 10 años hace

Resuelto


Remove NaN ?
input -> matrix (n*m) with at least one element equal to NaN; output -> matrix(p*m), the same matrix where we deleted the enti...

casi 10 años hace

Resuelto


Find hen's weight.
If hen weights x kilos on two legs, how much does it weights on one leg? Output the result.

casi 10 años hace

Resuelto


3D indexes
Generalisation in 3 dimensions of the <http://nl.mathworks.com/matlabcentral/cody/problems/43117-2d-indexes Problem 43117. 2D I...

casi 10 años hace

Resuelto


Marvel or DC?
Given input vector determine if there's a DC value. If there is, output 'DC', else output 'MARVEL'

casi 10 años hace

Resuelto


I told you not separate me, but you did :( - ACDC
Given input vector, output it's DC and AC value Example: input = 0 1 -1 0 ac = 0 1 -1 0 dc = 0

casi 10 años hace

Resuelto


Linear Least Squares (L2 fitting problem )
Given a set of real measurements (x(i), y(i)) find a line sol(1)x + sol(2) (more specifically furnish the vector with...

casi 10 años hace

Resuelto


A little bit of luck needed
This one may require a little bit of guess work, but it is possible. Hints: - The same solution might fail the tests once and ...

casi 10 años hace

Enviada


Fast Sampling From A Discrete Distribution
This function generates independent random samples according to a prescribed discrete distribution.

casi 10 años hace | 2 descargas |

5.0 / 5

Resuelto


Modified run-length companion vector
Given a vector x, return a vector that indicates the run length of any value in x. Each element in output vector shows how many ...

casi 10 años hace

Resuelto


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

casi 10 años hace

Problema


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

casi 10 años hace | 6 | 43 solvers

Resuelto


Prouhet–Tarry–Escott (basic)
Inspired by <http://www.mathworks.com/matlabcentral/cody/problems/660-find-a-subset-that-divides-the-vector-into-equal-halves pr...

casi 10 años hace

Resuelto


Make a run-length companion vector
Given a vector x, return a vector r that indicates the run length of any value in x. Each element in r shows how many times the ...

casi 10 años hace

Resuelto


Find the coefficients for numerical integration using Simpson's rule
For using numerical integration using Simpson's rule, we need some coefficients to be determined first. Suppose the n is the nu...

casi 10 años hace

Cargar más