Resuelto


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

alrededor de 9 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...

alrededor de 9 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...

alrededor de 9 años hace

Resuelto


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

alrededor de 9 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

alrededor de 9 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...

alrededor de 9 años hace

Resuelto


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

alrededor de 9 años hace

Resuelto


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

alrededor de 9 años hace

Resuelto


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

alrededor de 9 años hace

Resuelto


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

alrededor de 9 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...

alrededor de 9 años hace

Resuelto


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

alrededor de 9 años hace

Resuelto


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

alrededor de 9 años hace

Resuelto


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

alrededor de 9 años hace

Resuelto


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

alrededor de 9 años hace

Resuelto


Multi-line comments
* Fix the syntax errors.

alrededor de 9 años hace

Resuelto


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

alrededor de 9 años hace

Resuelto


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

alrededor de 9 años hace

Resuelto


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

alrededor de 9 años hace

Resuelto


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

alrededor de 9 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...

alrededor de 9 años hace

Resuelto


Coordinate geometry
Assign pointsDistance with the distance between point (x1, y1) and point (x2, y2). The distance is calculated by: Distance =...

alrededor de 9 años hace

Resuelto


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

alrededor de 9 años hace

Resuelto


Comments
* Fix the syntax errors.

alrededor de 9 años hace

Resuelto


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

alrededor de 9 años hace

Resuelto


Rotate a Matrix
Input a Matrix x, Output y is the matrix rotating x 90 degrees clockwise

alrededor de 9 años hace

Resuelto


Population growth
Assign finalPopulation with the population size given an initial population, population growth rate, and number of years. The fi...

alrededor de 9 años hace

Resuelto


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

alrededor de 9 años hace

Resuelto


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

alrededor de 9 años hace

Resuelto


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

alrededor de 9 años hace

Cargar más