Solved

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

más de 5 años ago

Solved

Function Iterator
Given a handle fh to a function which takes a scalar input and returns a scalar output and an integer n >= 1, return a handle f...

más de 5 años ago

Solved

Back to basics 22 - Rotate a matrix
Covering some basic topics I haven't seen elsewhere on Cody. Rotate the input matrix 90 degrees counterclockwise (e.g. [1 2; ...

más de 5 años ago

Solved

Omit columns averages from a matrix
Omit columns averages from a matrix. For example: A = 16 2 3 13 5 11 10 8 9 7 ...

más de 5 años ago

Solved

Indexed Probability Table
This question was inspired by a Stack Overflow question forwarded to me by Matt Simoneau. Given a vector x, make an indexed pro...

más de 5 años ago

Solved

Given an unsigned integer x, find the largest y by rearranging the bits in x
Given an unsigned integer x, find the largest y by rearranging the bits in x. Example: Input x = 10 Output y is 12 ...

más de 5 años ago

Solved

All capital?
Are all the letters in the input string capital letters? Examples: 'MNOP' -> 1 'MN0P' -> 0

más de 5 años ago

Solved

<http://en.wikipedia.org/wiki/Benford%27s_law Benford's Law> states that the distribution of leading digits is not random. This...

más de 5 años ago

Solved

Nearest Numbers
Given a row vector of numbers, find the indices of the two nearest numbers. Examples: [index1 index2] = nearestNumbers([2 5 3...

más de 5 años ago

Solved

Solve the Sudoku Row
*Description* A simple yet tedious task occurs near the end of most Sudoku-solving algorithms, computerized or manual. The ta...

más de 5 años ago

Solved

Multielement indexing of a row array
The row array birthRateChina stores the China birth rate (per 1000 people) for years 2000 to 2012. Write a statement that create...

más de 5 años ago

Solved

Return a list sorted by number of occurrences
Given a vector x, return a vector y of the unique values in x sorted by the number of occurrences in x. Ties are resolved by a ...

más de 5 años ago

Solved

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

más de 5 años ago

Solved

Computing wind chill
On a windy day, a temperature of 15 degrees may feel colder, perhaps 7 degrees. The formula below calculates the "wind chill," i...

más de 5 años ago

Solved

Relational operators: Guessing game
* Row array userGuess contains a sequence of user guesses. Assign correctGuess with true when myNumber is equal to the user gues...

más de 5 años ago

Solved

Relational operators and row arrays: Overweight baggage
* Assign overweightBaggage with true wherever baggageWeight is above maximumWeight

más de 5 años ago

Solved

Comparing floating point values
* Assign matchFound with true if firstSample and secondSample within thresholdValue.

más de 5 años ago

Solved

Concatenating strings
* Write a statement that assigns fullName with firstName, a space, then lastName. Ex: If firstName is Alan and lastName is Tu...

más de 5 años ago

Solved

Constructing strings
* Construct a string alphaString from 'a' to endLetter, using the double colon operator.

más de 5 años ago

Solved

Constructing column arrays
* Construct a column array elevatorStops with values 2, 4, 5, 9, and 10

más de 5 años ago

Solved

Column arrays: Transpose a row array
* Construct a row array countValues with elements 1 to endValue, using the double colon operator. * Transpose countValues to re...

más de 5 años ago

Solved

Logical indexing: Player scores
Player 1 and player 2 take turns playing a game. Row array gameScores contains the scores of player 1, then player 2, then playe...

más de 5 años ago

Solved

Declaring a character
* Assign middleInitial with the character T.

más de 5 años ago

Solved

Assigning a sum
* Write a statement that assigns numCoins with numNickels + numDimes.

más de 5 años ago

Solved

Linear-spaced points array
* Construct a row array plotPoints with 5 values that are spaced linearly from lowValue to highValue. Ex: If lowValue is 1 and ...

más de 5 años ago

Solved

Indexing the last element: Print queue
* Delete the last element of row array printQueue.

más de 5 años ago

Solved

Find out Binomial coefficient
Find out the <http://en.wikipedia.org/wiki/Binomial_coefficient Binomial coefficient>. There is a function available in MATL...

más de 5 años ago

Solved

Y=X
Given an input variable x, output a variable y that is equal in value to x. Example: Input x = 1 Output y is 1 Inp...

más de 5 años ago

Solved