Resuelto


Set defaults
Write a function that computes the volume of a cube. The function should be able to accept three inputs: the length, width, and...

casi 6 años hace

Resuelto


Replace all zeros and NaNs in a matrix with the string 'error'
Given a numeric input matrix A, possibly containing some zero values and some NaNs, replace any occurrences of zero or NaN with ...

casi 6 años hace

Resuelto


cos for boss?
a programmer had too much coffee and his boss needs cos(alpha+beta) correctly, especially when alpha or beta are close to pi/2 a...

casi 6 años hace

Resuelto


letter yes yes & letter no no
Split a string into two strings, wherein the first string has all alphabetic letters and the second string has all the remaining...

casi 6 años hace

Resuelto


Exponents in Factorials
It's time to get excited about numbers!!! Well, we're just dealing with factorials here, but it's still a good reason to get ex...

casi 6 años hace

Resuelto


Narcissistic problem
How many likes has this problem?

casi 6 años hace

Resuelto


How many bottles can you drink?
Sometimes if you buy a drink in a glass bottle you can return that bottle and get some money back. Let's assume we have "x" a...

casi 6 años hace

Resuelto


Basics - not so easy division
Please make a function whcih divides x/y, but pay attention for some exceptions with NaN,0,Inf. Sometimes return "ERROR" instead...

casi 6 años hace

Resuelto


Simple date to serial no. conversion
Convert a date string to a serial date number. For example if you take x='19-May-2001' then the result is 730990 x...

casi 6 años hace

Resuelto


Volume of a sphere given its surface area
You just measured its surface area, that is the input.

casi 6 años hace

Resuelto


"Cody" * 5 == "CodyCodyCodyCodyCody"
*Alice*: What? *"Cody" * 5 == "CodyCodyCodyCodyCody"*? You've gotta be kidding me! *Bob*: No, I am serious! Python supports...

casi 6 años hace

Resuelto


Find the Final State of an Abelian Sandpile
Let us define an <http://nautil.us/issue/23/dominoes/the-amazing-autotuning-sandpile Abelian sand pile> as a matrix that is only...

casi 6 años hace

Resuelto


Fill the Matrix - 2
Input is a column vector and n. n columns will be added to the left of the input column. The first value of the row is the me...

casi 6 años hace

Resuelto


Fill the matrix - 1
Input is a column vector and n. n columns will be added to the left of the input column. The first value of the row is the s...

casi 6 años hace

Resuelto


Birthday cake
It's Cody's 5th birthday, and you've been tasked with putting the candles on the cake. Your goal is to maximize the distance bet...

casi 6 años hace

Resuelto


edge detection
write a function that gives the indexes of rising or falling edge x is a vector (assume it contains always at least one eleme...

casi 6 años hace

Resuelto


Next Lower Power of B
Given a number _n_ and a base _B_ greater than 1, return the lowest integer power of _B_ that is less than or equal to _n_. E...

casi 6 años hace

Resuelto


How long do each of the stages of the rocket take to burn?
A space rocket has 3 stages: - stage 1, s1; - stage 2, s2; - stage 3, s3. If s1 burns 3 x as long as s2 which burns ...

casi 6 años hace

Resuelto


generate a matrix of Legendre polynomials
input = x - the degree of the polynomial output = matrix of Legendre polynomials

casi 6 años hace

Resuelto


Weave two vectors into one
Weave the two given vectors into one as shown below. Example: If a = [1 1 1] b = [0 0 0] then y = [1 0 1 0 ...

casi 6 años hace

Resuelto


Power of n ?
Determine if _x_ (positive integer) is a power of _n_, return true or false accordingly.

casi 6 años hace

Resuelto


Set a Soroban Abacus
*Description* This problem is the inverse of <http://www.mathworks.com/matlabcentral/cody/problems/136-read-a-soroban-abacus ...

casi 6 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 6 años hace

Resuelto


Pairwise Euclidean Distance
Given two matrices A,B of dimensions NxK and NxL respectively, calculate the pairwise euclidean distance of all vectors (columns...

casi 6 años hace

Resuelto


Tautology
Check if the given expression is always true. For example, the sentence '~(A & B) == (~A | ~B)' is always true. Chara...

casi 6 años hace

Resuelto


Ned's queens
A tribute to Cody's five-year anniversary should also celebrate the people behind Cody, and in this particular case, our illustr...

casi 6 años hace

Resuelto


Mechanical Advantage of a Gear Train
Calculate the mechanical advantage of a gear train. The mechanical advantage of a gear couple is given by MA = T_o/T_i where ...

casi 6 años hace

Resuelto


Sum my indices
Given inputs M and N (in that order), output an MxN matrix whose entries are equal to the sum of their indices. Example input...

casi 6 años hace

Resuelto


Is the paranthesis sequence balanced ?
Quantum mechanics and computer science are interested in <http://en.wikipedia.org/wiki/Bra%E2%80%93ket_notation bra-kets>. Today...

casi 6 años hace

Resuelto


Bernoulli's Equation
Bernoulli's equation states that for an incompressible fluid the following summation is constant across the flow: v^2/2 + g*z + ...

casi 6 años hace

Cargar más