Risolto


Luggage delivery
Assign deliveryCost with the cost to deliver a piece of baggage weighing baggageWeight. The service charges twenty dollars for ...

oltre 10 anni fa

Risolto


Left Riemann numerical integration
A curve is represented by column arrays xCoordinate and yCoordinate. Approximate the integral from xCoordinate(1) to xCoordinate...

oltre 10 anni fa

Risolto


Sum function: Counting cookies
Row array troopCookieSales contains the number of boxes of cookies sold by each troop member. Assign totalSales with the sum of ...

oltre 10 anni fa

Risolto


Forward difference approximation: Car temperatures
Column arrays measuredTemperature and sampleTime contain engine temperature measurement samples, and the time each sample was co...

oltre 10 anni fa

Risolto


Health app
A health app records a user's weight and displays the change in weight from the previous measurement to the next. Assign weightC...

oltre 10 anni fa

Risolto


Compute change
A cashier distributes change using the maximum number of five dollar bills, followed by one dollar bills. Given amountToChange, ...

oltre 10 anni fa

Risolto


Currency conversion
A currency exchange booth offers an exchange rate of 119.771 Japanese yen for 1 US dollar. The currency exchange booth rounds do...

oltre 10 anni fa

Risolto


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

quasi 11 anni fa

Risolto


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

quasi 11 anni fa

Risolto


Function definition: Double down.
* Complete the DoubleDown function to return twice the initialValue.

quasi 11 anni fa

Risolto


Function definition: BMI calculator
Define a function CalculateBMI with inputs massKg and heightCm. The function returns bodyMassIndex. The function should be able ...

circa 11 anni fa

Risolto


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

circa 11 anni fa

Risolto


Extracting data: Heart rate (pulse)
The resting heart rate for an average adult is 60 - 100 beats per minute. Assign row array heartExtracted with all values in row...

circa 11 anni fa

Risolto


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

circa 11 anni fa

Risolto


Logical operators: Flipping bits
The xor operator will toggle the bit if the bit is xored with 1. Ex: 1 XOR 0 = 1, 1 XOR 1 = 0. The xor operator will retain th...

circa 11 anni fa

Risolto


Logical operators and arrays: 3-input and truth table
Given 3 inputs (inputA, inputB, inputC), assign threeInputAnd with the truth table outcomes for a 3 variable logical-and operati...

circa 11 anni fa

Risolto


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

circa 11 anni fa

Risolto


Multiple element-wise operations: Percent change
Row arrays sales2013 and sales2014 reflect the quarterly sales (in millions) of a popular potato chip company. Write a statement...

circa 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

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

circa 11 anni fa

Risolto


Plus x: A first program
_Solve this problem in Mathwork's online Cody system._ Write a statement that assigns y with 5 plus x. Ex: If input x = 2,...

circa 11 anni fa

Risolto


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

circa 11 anni fa

Risolto


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

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

circa 11 anni fa

Risolto


Assigning a sum
* Write a statement that assigns numCoins with numNickels + numDimes.

circa 11 anni fa

Risolto


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

circa 11 anni fa

Risolto


Declaring a character
* Assign middleInitial with the character T.

circa 11 anni fa

Risolto


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

circa 11 anni fa

Risolto


Constructing column arrays
* Construct a column array elevatorStops with values 2, 4, 5, 9, and 10

circa 11 anni fa

Risolto


Constructing strings
* Construct a string alphaString from 'a' to endLetter, using the double colon operator.

circa 11 anni fa

Carica altro