Resuelto


MATLAB Basics: Complex Numbers
For a given complex number, x, return the real and imaginary parts as a vector, y = [Real Imaginary].

alrededor de 4 años hace

Resuelto


Proper Factors
Generate the proper factors of input integer x and return them in ascending order. For more information on proper factors, refer...

alrededor de 4 años hace

Resuelto


Get all prime factors
List the prime factors for the input number, in decreasing order. List each factor. If the prime factor occurs twice, list it as...

alrededor de 4 años hace

Resuelto


Count photos
Given n people, everyone must have pictures taken with everyone, each photo includes only two persons, please count the total nu...

alrededor de 4 años hace

Resuelto


Sideways sum
Given natural number calculate its _population count_.

alrededor de 4 años hace

Resuelto


Alternative Scoring. Create an incremental spiral.
This problem is created to test an alternative Cody scoring system. It is based on the current one, but few changes are introduc...

alrededor de 4 años hace

Resuelto


How unique?
Sometimes, when we check unique entries of vector we would like to know how many times each value occurs. Given vector of num...

alrededor de 4 años hace

Resuelto


Calculate the Number of Sign Changes in a Row Vector (No Element Is Zero)
For a row vector: V=[7 1 2 -3] there is one sign change (from 2 to -3). So, the function you write must return N=1. F...

alrededor de 4 años hace

Resuelto


How many solutions has this problem?
Guess, predict or calculate :-) (You will be scored by the accuracy). Update: <http://www.mathworks.co.uk/matlabcent...

alrededor de 4 años hace

Resuelto


Making change
Given an amount of currency, return a vector of this form: [100 50 20 10 5 2 1 0.5 0.25 0.1 0.05 0.01] Example: Input a = ...

alrededor de 4 años hace

Resuelto


Create an n-by-n null matrix and fill with ones certain positions
The positions will be indicated by a z-by-2 matrix. Each row in this z-by-2 matrix will have the row and column in which a 1 has...

alrededor de 4 años hace

Resuelto


Set a diagonal
Given a matrix M, row vector v of appropriate length, and diagonal index d (where 0 indicates the main diagonal and off-diagonal...

alrededor de 4 años hace

Resuelto


Beads on a Necklace (Convex Hulls)
We may describe a <http://en.wikipedia.org/wiki/Convex_hull convex hull> as a rubber band stretched around a list of points. Som...

alrededor de 4 años hace

Resuelto


Spot the outlier
All points except for one lie on a line. Which one is the outlier? Example: You are given a list of x-y pairs in a column ...

alrededor de 4 años hace

Resuelto


Angle between two vectors
You have two vectors , determine the angle between these two vectors For example: u = [0 0 1]; v = [1 0 0]; The a...

alrededor de 4 años hace

Resuelto


Calculate the sum of elements of n*n Hilbert matrix.
Calculate the sum of elements of n*n Hilbert matrix. For example, for n=5: HilbertMatrix = [1.0000 0.5000 0.333...

alrededor de 4 años hace

Resuelto


Find sum of negative elements in row.
Find sum of negative elements in row. Example x=[1 -5 3 4 -6 6 7 8 9 10] result = -11

alrededor de 4 años hace

Resuelto


Convert array of decimal numbers into hexadecimal numbers array.
Convert array of decimal numbers into hexadecimal numbers array. Example x =[ 32 33 34 35 36 37 38 ...

alrededor de 4 años hace

Resuelto


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

alrededor de 4 años hace

Resuelto


Divide polynomial p1 by p2.
Divide polynomial p1 by p2 given as vectors. Return result q and r vectors which corresponds the quotient and remainder of divis...

alrededor de 4 años hace

Resuelto


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

alrededor de 4 años hace

Resuelto


Octoberfest festival
A group of students decided to visit Octoberfest festival. First they ordered one beer, then after half-hour they taken one more...

alrededor de 4 años hace

Resuelto


Temperature conversion
Convert temperature in degrees Celsius (C) to temperature in degrees Kelvin (K). Assume your answer is rounded to the nearest Ke...

alrededor de 4 años hace

Resuelto


Don't Try, give up and return NaN.
This is another version of <http://www.mathworks.com/matlabcentral/cody/problems/3107-try-and-catch-simple-example problem 3107....

alrededor de 4 años hace

Resuelto


MiniMax
Find the smallest value in array, which is the maximum of its row and column. Example: in array shown below are two numbers w...

alrededor de 4 años hace

Resuelto


Narcissistic problem
How many likes has this problem?

alrededor de 4 años hace

Resuelto


Polite numbers. Politeness.
A polite number is an integer that sums of two or more consecutive positive integers. Politeness of a positive integer is a num...

alrededor de 4 años hace

Resuelto


Polite numbers. N-th polite number.
A polite number is an integer that sums of at least two consecutive positive integers. For example _7 = 3+4_ so 7 is a polite...

alrededor de 4 años hace

Resuelto


Pernicious Anniversary Problem
Since Cody is 5 years old, it's pernicious. A <http://rosettacode.org/wiki/Pernicious_numbers Pernicious number> is an integer w...

alrededor de 4 años hace

Cargar más