A résolu


Armstrong Number
Determine whether the given input n-digit number is Armstrong Number or not. Return True if it is an Armstrong Number. An n-D...

plus de 11 ans il y a

A résolu


vector to string
Determine what the ASCII characters spell out. Example: input = [ 72 73 71 72] output = 'HIGH'

plus de 11 ans il y a

A résolu


Keep Only the Upper characters in a string
Keep Only the Upper characters in a string s = 'Sreeram Mohan'; output = SM;

plus de 11 ans il y a

A résolu


Find the mode of the given input
Find the statistical <http://en.wikipedia.org/wiki/Mode_(statistics)/ mode> of the given input. Example: If X is matr...

plus de 11 ans il y a

A résolu


Box!
Given a box, find the volume of the cube. With each side = a.

plus de 11 ans il y a

A résolu


Adding Cells with numbers defined as strings
Given a cell, with strings representing numbers, add each value. For example: a = {'9','33'}; the output should be: ...

plus de 11 ans il y a

A résolu


Assign matrix rows/columns to separate variables
This is a slight variant of <http://www.mathworks.com/matlabcentral/cody/problems/2668-assign-matrix-elements-to-separate-variab...

plus de 11 ans il y a

A résolu


Generalised Hamming Number
Inspired by Project Euler n°204 and Problem 1308 by James A generalised Hamming number of type n, has no prime factor larger ...

plus de 11 ans il y a

Problème


Generalised Hamming Number
Inspired by Project Euler n°204 and Problem 1308 by James A generalised Hamming number of type n, has no prime factor larger ...

plus de 11 ans il y a | 13 | 362 solveurs

A résolu


Error handling
If the input is a negative number, generate an error. Otherwise, return the number.

plus de 11 ans il y a

A résolu


Give me Hamming on five, hold the mayo
A Hamming Number is a positive number that has no prime factor greater than 5. Given a number X, determine how many Hamming num...

plus de 11 ans il y a

A résolu


Check if vertices form a rectangle
Given a set of 4 vertices defined by vectors X and Y, return true if the vertices form a rectangle and false otherwise. X and...

plus de 11 ans il y a

A résolu


Assign matrix elements to separate variables
Given an input array, return each element of the array as a separate variable. If the number of output arguments (k) is less tha...

plus de 11 ans il y a

A résolu


How to reverse spdiags ?
The spdiags function extracts all nonzero diagonals from the m-by-n matrix A. So if A=[1 2 3;4 5 6;7 8 9], spdiags(A)=[7 4...

plus de 11 ans il y a

A résolu


The Number of Ways
Find all the possible ways to reach the end of a matrix. So given [a b c d] the possible ways [a c],[a d],[b c],[b ...

plus de 11 ans il y a

A résolu


Divisors for big integer
Inspired by Problem 1025 and Project Euler 12. Given n, return the number y of integers that divide N. For example, with ...

plus de 11 ans il y a

Problème


Divisors for big integer
Inspired by Problem 1025 and Project Euler 12. Given n, return the number y of integers that divide N. For example, with ...

plus de 11 ans il y a | 4 | 246 solveurs

A résolu


distance to a straight line (2D) given any 2 distinct points on this straight line
Given 2 points P1,P2 on a straight line and a 3rd point, determine the distance of the 3rd point to the straight line. Your answ...

plus de 11 ans il y a

A résolu


High Precision Square Root (Inspired by Project Euler 80)
Given a positive integer n which is not a perfect square, write a MATLAB script that will calculate the square root of n truncat...

plus de 11 ans il y a

A résolu


Break it up! Break it up!
You have N pennies. Write a Matlab script that will reveal how many different ways you can break up those pennies. For example...

plus de 11 ans il y a

A résolu


Write a cubic formula function
Create a function that will output the three roots of a cubic equation specified by the 4 coefficients listed as input. The outp...

plus de 11 ans il y a

A résolu


Change Vector Value
Change the element of the vector with respect to the element of the direction vector If the element of the direction vecto...

plus de 11 ans il y a

A résolu


Finite Continued Fraction
Given an input real number x and a natural number n, output the row vector with the n first terms of the continued fraction. F...

plus de 11 ans il y a

A résolu


Kurchan 5x5 - Optimal Score
Related to Problems 1646 and 2650, but bigger. Technically, all you need to do for this Cody problem is input a 5x5 matrix conta...

plus de 11 ans il y a

A résolu


all possible subsets of set
Given a vector, return all possible subsets of the vector in a cell array. Properties of basic set theory is assumed to be valid...

plus de 11 ans il y a

A résolu


Average speed for the entire trip
The input is two speeds (for the trip and return trip) and output is average speed. Assume units are consistent, say miles per h...

plus de 11 ans il y a

A résolu


Elastic Collision 001: 1-D
Elastic Collision of two particles. <http://en.wikipedia.org/wiki/Elastic_collision wiki Elastic Collision> Solve Conservat...

plus de 11 ans il y a

A résolu


Track Logic
A sensor produces either a hit (1) or a miss (0) for a given target once per scan. The sensor is also equiped with a tracker whi...

plus de 11 ans il y a

A résolu


Function writing test
Tests your ability to write a trivial function.

plus de 11 ans il y a

A résolu


Property dispute!
Two neighbors have rectangular plots of land A and B. The surveyors give you the coordinates of each. If they overlap, there is ...

plus de 11 ans il y a

Charger plus