Gelöst


Find state names that start with the letter N
Given a list of US states, remove all the states that start with the letter N. If s1 = 'Alabama Montana Nebraska Vermont Ne...

etwa 11 Jahre vor

Gelöst


Get the area codes from a list of phone numbers
Given a string of text with phone numbers in it, return a unique'd cell array of strings that are the area codes. s = '508-647...

etwa 11 Jahre vor

Gelöst


Clean the List of Names
Given a list of names in a cell array, remove any duplications that result from different capitalizations of the same string. So...

etwa 11 Jahre vor

Gelöst


Remove the small words from a list of words.
Your job is to tidy up a list of words that appear in a string. The words are separated by one or more spaces. Remove all words ...

etwa 11 Jahre vor

Gelöst


Find the two-word state names
Given a list of states, remove all the states that have two-word names. If s1 = 'Alabama Montana North Carolina Vermont N...

etwa 11 Jahre vor

Gelöst


Find state names that end with the letter A
Given a list of US states, remove all the states that end with the letter A. Example: Input s1 = 'Alabama Montana Nebras...

etwa 11 Jahre vor

Gelöst


give nth decimal place of pi
max 15th place after the decimal point is ok for now

etwa 11 Jahre vor

Gelöst


Compute a dot product of two vectors x and y
x and y are input vectors, d is a number and contains their dot product

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


So many choices
For inputs _n_ and _k_ (in that order), output the number of ways that k objects can be chosen from amongst n distinct objects. ...

etwa 11 Jahre vor

Gelöst


Counting in Finnish
Sort a vector of single digit whole numbers alphabetically by their name, in Finnish. See the Wikipedia page for <http://en.wik...

etwa 11 Jahre vor

Gelöst


Number of 1s in the Binary Representation of a Number
*Description* Return the number of 1s in the (unsigned integer) binary representation of a number. This function should be ab...

etwa 11 Jahre vor

Gelöst


Duplicate each element of a vector.
for an n-dimensional vector x, the function should return another vector 2n-dimension which each element is repeated twice. Ex...

etwa 11 Jahre vor

Gelöst


Back to basics 10 - Max Float
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive floating-point number MATLAB can han...

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


Project Euler: Problem 10, Sum of Primes
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below the input, N. Thank you <http:/...

etwa 11 Jahre vor

Gelöst


Implement a ROT13 cipher
Replace each character in string s1 with the character that is shifted 13 positions from it (wrap back to the beginning if neces...

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


Renaming a field in a structure array
MATLAB has a <http://www.mathworks.com/help/techdoc/ref/setfield.html setfield> and a <http://www.mathworks.com/help/techdoc/ref...

etwa 11 Jahre vor

Gelöst


All your base are belong to us
Find the base _b_ logarithm of the input decimal number _x_. Express the output as a decimal number. The first argument is the n...

etwa 11 Jahre vor

Gelöst


Project Euler: Problem 6, Natural numbers, squares and sums.
The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ...

etwa 11 Jahre vor

Gelöst


Getting the indices from a vector
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to <http://www.mathworks....

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


Remove NaN ?
input -> matrix (n*m) with at least one element equal to NaN; output -> matrix(p*m), the same matrix where we deleted the enti...

etwa 11 Jahre vor

Gelöst


Love triangles
Given a vector of lengths [a b c], determines whether a triangle with non-zero area (in two-dimensional Euclidean space, smarty!...

etwa 11 Jahre vor

Gelöst


Increment a number, given its digits
Take as input an array of digits (e.g. x = [1 2 3]) and output an array of digits that is that number "incremented" properly, (i...

etwa 11 Jahre vor

Gelöst


Check if number exists in vector
Return 1 if number _a_ exists in vector _b_ otherwise return 0. a = 3; b = [1,2,4]; Returns 0. a = 3; b = [1,...

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Mehr laden