Solved


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

8 years ago

Solved


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

8 years ago

Solved


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

8 years ago

Solved


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

8 years ago

Solved


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

8 years ago

Solved


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

8 years ago

Solved


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

8 years ago

Solved


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

9 years ago

Solved


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

9 years ago

Solved


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

9 years ago

Solved


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

9 years ago

Solved


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

9 years ago

Solved


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

9 years ago

Solved


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

9 years ago

Solved


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

9 years ago

Solved


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

9 years ago

Solved


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

9 years ago

Solved


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

9 years ago

Solved


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

9 years ago

Solved


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

9 years ago

Solved


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

9 years ago

Solved


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

9 years ago

Solved


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

9 years ago

Solved


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

9 years ago

Solved


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

9 years ago

Solved


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

9 years ago

Solved


Declaring a character
* Assign middleInitial with the character T.

9 years ago

Solved


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

9 years ago

Solved


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

9 years ago

Solved


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

9 years ago

Load more