Risolto


Should Mr McNugget even get out of bed today?
As we learned in <http://www.mathworks.com/matlabcentral/cody/problems/42888-frobenius-mcnugget-factorization an earlier problem...

oltre 10 anni fa

Problema


Should Mr McNugget even get out of bed today?
As we learned in <http://www.mathworks.com/matlabcentral/cody/problems/42888-frobenius-mcnugget-factorization an earlier problem...

oltre 10 anni fa | 1 | 15 risolutori

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


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


Multiply by 3
There are many ways to obtain 3 times a number. You could multiply by 3, add the number 3 times, multiply by 6 and then subtract...

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


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


Values in Array
How many values are in the array

oltre 10 anni fa

Risolto


Kurchan 4x4 - Optimal score
Related to Problem 1646, but bigger. Technically, all you need to do for this Cody problem is input a 4x4 matrix containing the...

oltre 10 anni fa

Risolto


Block average ignoring NaN values
Given a matrix, calculate the block average of each disjoint sub-matrix while ignoring *NaN* values. Assume that the size of the...

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


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


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


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

Problema


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 | 1 | 102 risolutori

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


Isothermal Expansion
Given the initial pressure and volume of an ideal gas, calculate the new volume, given the new pressure. Hint: <https://en.wi...

oltre 10 anni fa

Risolto


Wien's displacement law
Given the black body temperature (in *Celsius*), output the weavelength (in *meters*) at which the radiation peaks, according to...

oltre 10 anni fa

Risolto


Detect pair of equal values in a Matrix
A 2D matrix of 2 rows and N columns with random integer numbers. A = [3 1 2 4 6 6 7; 7 3 2 1 5 2 4] ...

oltre 10 anni fa

Risolto


means
Calculate the arithmetic, the geometric and the harmonic mean of a given vector (with positive elements) and return them in a ve...

oltre 10 anni fa

Risolto


Hilbert numbers
Given a positive integer, n, return h as follows: 1. If n is not a <https://en.wikipedia.org/wiki/Hilbert_number Hilbert numb...

oltre 10 anni fa

Risolto


Number construction III
Given a positive integer, n, return a, b and c, such that 1. n = a^1.5+b^2.5+c^3.5 2. a, b and c are all positive integers...

oltre 10 anni fa

Risolto


fractal circles
Create a fractal with circles using the same process as the Sierpinski triangle (https://en.wikipedia.org/wiki/Sierpinski_trian...

oltre 10 anni fa

Risolto


Number construction II
Given a positive integer, n, return a, b, c and d, such that 1. n = a*2^b+c*3^d 2. a, b, c and d are all positive integers...

oltre 10 anni fa

Risolto


Euler–Mascheroni constant
Approximate the Euler-Mascheroni constant using the series representation gamma_n=\sum_{k=1}^{n} [1/k-ln(1+1/k)] Calculat...

oltre 10 anni fa

Risolto


solid of revolution
Given an real polynomial P and two real numbers a,b with 0<=a<=b. Calculate the volume of the solid of revolution made by rota...

oltre 10 anni fa

Risolto


Coefficients and vertex of a parabola given 3 points
Given 3 points, each defined by x and y, compute the coefficients: [a,b,c] of a parabola with equation: y = ax^2 + bx + c passin...

oltre 10 anni fa

Risolto


generate number in particular way
A = [1 5 2 7]; MAX = 10; generate a array Y = [1 2 2 2 2 2 3 3 4 4]; i.e. total eleme...

oltre 10 anni fa

Risolto


Sum two real numbers
It seems easy, but... You cannot use +, -, plus, diff, cumsum, *, prod, times, etc.

oltre 10 anni fa

Carica altro