Resuelto


Remove DC
Input x is the sampled signal vector, may have both AC and DC components. Output y should not contain any DC component. Examp...

alrededor de 13 años hace

Resuelto


First N Perfect Squares
*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];

alrededor de 13 años hace

Resuelto


Right and wrong
Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...

alrededor de 13 años hace

Resuelto


inner product of two vectors
inner product of two vectors

alrededor de 13 años hace

Resuelto


radius of a spherical planet
you just measured its surface area, that is the input.

alrededor de 13 años hace

Resuelto


Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

alrededor de 13 años hace

Resuelto


Find the longest sequence of 1's in a binary sequence.
Given a string such as s = '011110010000000100010111' find the length of the longest string of consecutive 1's. In this examp...

alrededor de 13 años hace

Resuelto


Pangrams!
A pangram, or holoalphabetic sentence, is a sentence using every letter of the alphabet at least once. Example: Input s ...

alrededor de 13 años hace

Resuelto


Find the alphabetic word product
If the input string s is a word like 'hello', then the output word product p is a number based on the correspondence a=1, b=2, ....

alrededor de 13 años hace

Resuelto


Rotate and display numbered tile
Imagine a square tile with four numbers on it, one on each edge. We will call these edges north, east, south, and west. If th...

alrededor de 13 años hace

Resuelto


Scoring for oriented dominoes
Given a list of ordered pairs, and the order they should be placed in a line, find the sum of the absolute values of the differe...

alrededor de 13 años hace

Resuelto


Stuff the Board
You have a stack of tiles to put onto an array-like playing board. Each tile has a number (always an integer), and the board var...

alrededor de 13 años hace

Resuelto


Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

alrededor de 13 años hace

Resuelto


Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the other numbers. Otherwise return false. E...

alrededor de 13 años hace

Resuelto


Balanced number
Given a positive integer find whether it is a balanced number. For a balanced number the sum of first half of digits is equal to...

alrededor de 13 años hace

Resuelto


Which values occur exactly three times?
Return a list of all values (sorted smallest to largest) that appear exactly three times in the input vector x. So if x = [1 2...

alrededor de 13 años hace

Resuelto


Target sorting
Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...

alrededor de 13 años hace

Resuelto


Who Has the Most Change?
You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

alrededor de 13 años hace

Resuelto


Remove the vowels
Remove all the vowels in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill' Output s2 is 'Jck nd Jll wn...

alrededor de 13 años hace

Resuelto


Given a window, how many subsets of a vector sum positive
Given a vector: [1 0 -1 3 2 -3 1] and a window of 2, A sliding window would find: 1 + 0 = 1 0 - 1 = -1 ...

alrededor de 13 años hace

Resuelto


Make a run-length companion vector
Given a vector x, return a vector r that indicates the run length of any value in x. Each element in r shows how many times the ...

alrededor de 13 años hace

Resuelto


Implement simple rotation cypher
If given a letter from the set: [abc...xyz] and a shift, implement a shift cypher. Example: 'abc' with a shi...

alrededor de 13 años hace

Resuelto


Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

alrededor de 13 años hace

Resuelto


Arrange vector in ascending order
Arrange a given vector in ascending order. input = [4 5 1 2 9]; output = [1 2 4 5 9];

alrededor de 13 años hace

Resuelto


No Twins?
Write a function that accepts as input a vector and returns the same vector, but retaining only the first occurrence of an eleme...

alrededor de 13 años hace

Resuelto


Back to basics 15 - classes
Covering some basic topics I haven't seen elsewhere on Cody. Return the class of the input variable.

alrededor de 13 años hace

Resuelto


Distance walked 2D
Suppose you go from x-y coordinates [3,4] to [0,0] to [0,1] to [1,1], then you walked 7 units of distance.

alrededor de 13 años hace

Resuelto


Convert a vector into a number
This is a sub problem related to this problem: <http://www.mathworks.com/matlabcentral/cody/problems/621-cryptomath-addition>...

alrededor de 13 años hace

Resuelto


Determine Whether an array is empty
Input a matrix x, output y is TRUE if x is empty, otherwise FALSE.

alrededor de 13 años hace

Resuelto


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

alrededor de 13 años hace

Cargar más