A résolu


Array resizing: Removing elements
* Remove elements 2, 4, and 6 from row array pendingTasks

plus de 8 ans il y a

A résolu


Logic array: Identifying qualifying times
Create a logic array qualifyingIndex with true for any location where the runner is male with a running time less than 8.2. Row ...

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

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

plus de 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

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

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

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

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

plus de 8 ans il y a

A résolu


Multi-line comments
* Fix the syntax errors.

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

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

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

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

plus de 8 ans il y a

A résolu


Double colon operator: Increment by x
* Construct a row array countValues from 0 to 25, elements incremented by incrementValue. Ex: If incrementValue is 5, countVa...

plus de 8 ans il y a

A résolu


Double colon operator: Counting up
* Construct a row array countValues from 1 to endValue, using the double colon operator. Ex: If endValue is 5, countValues s...

plus de 8 ans il y a

A résolu


Indexing an array element
* Assign currentStudent with the second element of array testScores. _Reminder: Array indexing starts with 1._

plus de 8 ans il y a

A résolu


Character variable: Compass direction
* Assign compassDirection with sensorReading's value. Both are character variables.

plus de 8 ans il y a

A résolu


Comments
* Fix the syntax errors.

plus de 8 ans il y a

A résolu


Declaring a string
* Assign streetAddress with the string 1313 Mockingbird Lane.

plus de 8 ans il y a

A résolu


Arithmetic array operations
* Add x to each element of array temperatureReadings.

plus de 8 ans il y a

A résolu


Construct an array
* Construct an row array named observedValues with elements sensorReading1, sensorReading2, and sensorReading3.

plus de 8 ans il y a

A résolu


Joining Ranges
You are given a n-by-2 matrix. Each row represents a numeric range, e.g. x = [0 5; 10 3; 20 15; 16 19; 25 25] contains...

plus de 8 ans il y a

A résolu


Find the repeating decimal pattern!
Write a function that takes one double input value and returns only the repeating decimal, if any, as a string. Only decimals f...

plus de 8 ans il y a

A résolu


Simple Past of Regular Verbs
Given a regular verb, return the simple past. Example Input verb = 'to work' Output simple_past = 'worked'

plus de 8 ans il y a

A résolu


Three...is a magic number.
Yes it is... It's a magic number... To help you get rid of that earworm, here's a new Cody problem. You are given a squar...

plus de 8 ans il y a

A résolu


Chess performance
After Problems <http://www.mathworks.com/matlabcentral/cody/problems/3054-chess-elo-rating-system/ 3054> and <http://www.mathwor...

plus de 8 ans il y a

A résolu


Chess probability
The difference in the ratings between two players serves as a predictor of the outcome of a match (the <http://en.wikipedia.org/...

plus de 8 ans il y a

Charger plus