A résolu


Function call in expression: Reduced pricing.
Write a single statement that assigns cartTotal with the discounted cost of items 1 and 2. Function DiscountedPrice will return ...

environ 10 ans il y a

A résolu


Variable sized row arrays
* Reverse the contents of row array mileMarkers

environ 10 ans il y a

A résolu


Logical variables: Running late?
* Assign onTime with true if noTraffic is true and gasEmpty is false.

environ 10 ans il y a

A résolu


Scrabble Scores
Given a word, determine its score in <http://en.wikipedia.org/wiki/Scrabble Scrabble>. The input string will always be provi...

environ 10 ans il y a

A résolu


Find the 9's Complement
Find the 9's complement of the given number. An example of how this works is <http://electrical4u.com/9s-complement-and-10s-c...

environ 10 ans il y a

A résolu


Relational operators and row arrays: Run times
* Construct a row array fastRunTimes containing all elements of runTimes equal to or less than 480 seconds. Ex: If runTimes =...

environ 10 ans il y a

A résolu


Indexing the array: Shift right with variable sized arrays
* Write a statement to shift the array contents 1 position to the left. * Assign the rightmost element with -1. Ex: [12, 85...

environ 10 ans il y a

A résolu


Nth root.
* Assign outValues with the nth root of the inValues, the root is specified by rootValue

environ 10 ans il y a

A résolu


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

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

environ 10 ans il y a

A résolu


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

environ 10 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

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

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

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

environ 10 ans il y a

A résolu


Multi-line comments
* Fix the syntax errors.

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

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

environ 10 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._

environ 10 ans il y a

A résolu


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

environ 10 ans il y a

A résolu


Logic variables
* Assign isAvailable with true.

environ 10 ans il y a

A résolu


Declaring a character
* Assign middleInitial with the character T.

plus de 10 ans il y a

A résolu


Model a falling body
An object is falling freely from a height of 22 meters under the force of gravity. <<http://blogs.mathworks.com/images/seth/c...

plus de 10 ans il y a

A résolu


Add damping to a mass spring system
Model an ideal mass-spring-damper system shown below where the spring is initially stretched. <<http://blogs.mathworks.com/im...

plus de 10 ans il y a

A résolu


Model a mass spring system
Model an ideal mass-spring system shown below where the spring is initially stretched. <<http://blogs.mathworks.com/images/se...

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


Computing wind chill
On a windy day, a temperature of 15 degrees may feel colder, perhaps 7 degrees. The formula below calculates the "wind chill," i...

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


The Dark Side of the Die
It is well-known that opposite sides of a classic hexahedral die add to 7. Given a vector of dice rolls, calculate the sum of th...

plus de 10 ans il y a

Charger plus