Risolto


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

quasi 11 anni fa

Risolto


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

quasi 11 anni fa

Risolto


03 - Matrix Variables 4
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3d.png>> A 3x4 NaN (Not a Number) matrix (Hint: use ...

quasi 11 anni fa

Risolto


Find perfect placement of non-rotating dominoes (easier)
Given a list of ordered pairs, find the order they should be placed in a line, such that the sum of the absolute values of the d...

quasi 11 anni fa

Risolto


Rotate and display numbered tile
Imagine a square tile with four numbers on it, one on each edge. We will call these edges north, east, south, and west. If th...

quasi 11 anni fa

Risolto


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

quasi 11 anni fa

Risolto


Scoring for oriented dominoes
Given a list of ordered pairs, and the order they should be placed in a line, find the sum of the absolute values of the differe...

quasi 11 anni fa

Risolto


Remove all the words that end with "ain"
Given the string s1, return the string s2 with the target characters removed. For example, given s1 = 'the main event' your ...

quasi 11 anni fa

Risolto


Divisible by 10
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

quasi 11 anni fa

Risolto


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

quasi 11 anni fa

Risolto


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

quasi 11 anni fa

Risolto


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

quasi 11 anni fa

Risolto


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

quasi 11 anni fa

Risolto


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

quasi 11 anni fa

Risolto


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

quasi 11 anni fa

Risolto


Comments
* Fix the syntax errors.

quasi 11 anni fa

Risolto


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

quasi 11 anni fa

Risolto


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

quasi 11 anni fa

Risolto


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

quasi 11 anni fa

Risolto


Multi-line comments
* Fix the syntax errors.

quasi 11 anni fa

Risolto


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

quasi 11 anni fa

Risolto


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

quasi 11 anni fa

Risolto


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

quasi 11 anni fa

Risolto


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

quasi 11 anni fa

Risolto


Declaring a character
* Assign middleInitial with the character T.

quasi 11 anni fa

Risolto


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

quasi 11 anni fa

Risolto


Logic variables
* Assign isAvailable with true.

quasi 11 anni fa

Risolto


Fahrenheit to Celsius using multiple statements
°C = (°F - 32) x 5/9 * Write a statement that assigns fractionalMultiplier with 5/9. * Write a second statement that assign...

quasi 11 anni fa

Risolto


Simple equation: Annual salary
Given an hourly wage, compute an annual salary by multiplying the hourly wage times 40 and times 50, because annualSalary = hour...

quasi 11 anni fa

Risolto


Compute total cost
A soda costs 2 dollars. A taco costs 3 dollars. Write a statement that assigns totalCost with the total meal cost given the numb...

quasi 11 anni fa

Carica altro