Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Problem


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

mehr als 11 Jahre vor | 13 | 362 Lösungsvorschläge

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Problem


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

mehr als 11 Jahre vor | 4 | 246 Lösungsvorschläge

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

fast 12 Jahre vor

Gelöst


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

fast 12 Jahre vor

Gelöst


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

fast 12 Jahre vor

Gelöst


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

fast 12 Jahre vor

Gelöst


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

fast 12 Jahre vor

Gelöst


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

fast 12 Jahre vor

Gelöst


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

fast 12 Jahre vor

Gelöst


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

fast 12 Jahre vor

Gelöst


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

fast 12 Jahre vor

Gelöst


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

fast 12 Jahre vor

Gelöst


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

fast 12 Jahre vor

Gelöst


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

fast 12 Jahre vor

Mehr laden