Resuelto


Prime factor digits
Consider the following number system. Calculate the prime factorization for each number n, then represent the prime factors in a...

más de 7 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.

más de 7 años hace

Resuelto


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

más de 7 años hace

Resuelto


It dseon't mettar waht oedrr the lrettes in a wrod are.
An internet meme from 2003 (read more <http://www.snopes.com/language/apocryph/cambridge.asp here>) asserted that readers are re...

más de 7 años hace

Resuelto


pressure to dB?
given x ratio of pressure, find corresponding y dB

más de 7 años hace

Resuelto


Find the largest value in the 3D matrix
Given a 3D matrix, A, find the largest value. E.g. >> A = 1:9; >> A=reshape(A,[3 1 3]); >> islargest(A) ans = 9

más de 7 años hace

Resuelto


Kaprekar Steps
6174 is the <http://en.wikipedia.org/wiki/6174_%28number%29 Kaprekar constant>. All natural numbers less than 10,000 (except som...

más de 7 años hace

Resuelto


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

más de 7 años hace

Resuelto


Find relatively common elements in matrix rows
You want to find all elements that exist in greater than 50% of the rows in the matrix. For example, given A = 1 2 3 5 ...

más de 7 años hace

Resuelto


Solving Quadratic Equations (Version 1)
Quadratic equations have the form: ax^2 + bx + c = 0. Example: x^2 + 3x + 2 = 0, where a = 1, b = 3, and c = 2. The equation has...

más de 7 años hace

Resuelto


Back to basics 9 - Indexed References
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix and row and column, output the index of th...

más de 7 años hace

Resuelto


Find the peak 3n+1 sequence value
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

más de 7 años hace

Resuelto


Back to basics 14 - Keywords
Covering some basic topics I haven't seen elsewhere on Cody. Return a cell array of all MATLAB keywords

más de 7 años hace

Resuelto


Find max
Find the maximum value of a given vector or matrix.

más de 7 años hace

Resuelto


Who is the smartest MATLAB programmer?
Who is the smartest MATLAB programmer? Examples: Input x = 'Is it Obama?' Output = 'Me!' Input x = 'Who ?' Ou...

más de 7 años hace

Resuelto


Alphabetize by last name
Given a list of names in a cell array, sort the list by the last name. So if list = {'Barney Google','Snuffy Smith','Dagwood ...

más de 7 años hace

Resuelto


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

más de 7 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 ...

más de 7 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...

más de 7 años hace

Resuelto


Wind Chill Computation
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 7 años hace

Resuelto


Back to basics 23 - Triangular matrix
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, return a matrix with all elements above a...

más de 7 años hace

Resuelto


Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.

más de 7 años hace

Resuelto


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

Resuelto


Integer indexing array: Reverse subsets
Construct an indexing array copySubset so that the statement reversedOrder = origOrder(copySubset); results in a row array begin...

más de 7 años hace

Resuelto


Indexing the array: Moving values
Assume sampleReadings always contains three elements. * Shift the array contents one position to the left. * The rightmost ...

más de 7 años hace

Resuelto


Concatenating arrays
* Assign studentIDs with concatenated row arrays groupA and groupB

más de 7 años hace

Resuelto


Relational operators and row arrays: Overweight baggage
Create a logical indexing array overweightBaggage with true in each location where the corresponding baggageWeight is greater th...

más de 7 años hace

Resuelto


Element-wise division
* Assign row array weightKilo with the corresponding weight in kilograms. Use the following conversion: kg = lb / 2.2

más de 7 años hace

Resuelto


Generate a vector like 1,2,2,3,3,3,4,4,4,4
Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2...

más de 7 años hace

Resuelto


Logical indexing: High scores
Row array gameScores contains all player scores. Construct a row array highScores than contains all player scores greater than 5...

más de 7 años hace

Cargar más