Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


Declaring a character
* Assign middleInitial with the character T.

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Mehr laden