A résolu


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

presque 8 ans il y a

A résolu


Back to basics 7 - Equal NaNs
Covering some basic topics I haven't seen elsewhere on Cody. Given 2 input variables, output true if they are equal, false ot...

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


Tree Height
Assign treeHeight with the tree height given the shadow length and angle of elevation. Simple geometry can compute the heigh...

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


Relational operators: Guessing game
Row array userGuess contains a sequence of user guesses. Create a logical indexing array correctGuess with true in each location...

presque 8 ans il y a

A résolu


Double colon operator: Counting down
* Construct a row array countValues from startValue to endValue, elements decremented by -2 Ex: If startValue is 10 and end...

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


Function definition: Volume of a pyramid
Define a function CalculatePyramidVolume with inputs baseLength, baseWidth, and pyramidHeight. The function returns pyramidVolum...

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


Integer indexing array: Shift left
Write a *single* statement that shifts row array attendanceValues one position to the left. The rightmost element in attendanceV...

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


Multi-line comments
* Fix the syntax errors.

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

Charger plus