Solved


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

10 years ago

Solved


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

10 years ago

Solved


Remove the positive integers.
Given array,x, remove all the positive numbers and display ouput as y. Example x=[1 -2 3 -4] , output is y=[-2 -4].

10 years ago

Solved


Multi-line comments
* Fix the syntax errors.

10 years ago

Solved


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

10 years ago

Solved


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

10 years ago

Solved


Comments
* Fix the syntax errors.

10 years ago

Solved


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

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

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

10 years ago

Solved


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

10 years ago

Solved


Write an expression
Assigns finalResult with firstSample plus secondSample, divided by 3. Ex: If firstSample is 18 and secondSample is 12, finalResu...

10 years ago

Solved


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

10 years ago

Solved


Declaring a character
* Assign middleInitial with the character T.

10 years ago

Solved


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

10 years ago

Solved


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

10 years ago

Solved


Matlab Basics - Pick out parts of a vector
Consider x a vector of length >= 7 (there are at least 7 elements in the vector, write a script that extracts the 2nd element, a...

10 years ago

Solved


Logic variables
* Assign isAvailable with true.

10 years ago

Solved


Matlab Basics - Set unwated parts of a vector to zero
Consider a vector x, of length >= 7, write a script to set elements 2, 5, and 6 to zero. e.g. x = [1 2 3 4 5 6 7] --> x = [1 ...

10 years ago

Solved


Coordinate geometry
Assign pointsDistance with the distance between point (x1, y1) and point (x2, y2). The distance is calculated by: Distance =...

10 years ago

Solved


Matlab Basics - Switching Assignments
Switch assignments for variables x and y, for example start with x = 1 and y = 3 end with y = 1 and x = 3 Do NOT simply r...

10 years ago

Solved


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

10 years ago

Solved


Beginner's Problem - Squaring
Try out this test problem first. Given the variable x as your input, square it by two and put the result in y. Examples: ...

10 years ago

Solved


Circle area using pi
Write a statement that assigns circleArea with the circle's area given circleRadius. Use the built-in mathematical constant pi. ...

10 years ago

Solved


Matlab Basics - y as a function of x
write a script to calculate y as a function of x, such that y = 6x^2 + 5x - 2

10 years ago

Solved


Matlab Basics - Rounding II
Write a script to round a variable x to 3 decimal places: e.g. x = 2.3456 --> y = 2.346

10 years ago

Solved


Matlab Basics - Absolute Value
Write a script that returns the absolute value of the elements in x e.g. x = [-1 -2 -3 -4] --> y = [1 2 3 4]

10 years ago

Solved


Matlab Basics - Rounding I
Write a script to round x DOWN to the next lowest integer: e.g. x = 2.3 --> x = 2 also: x = 2.7 --> x = 2

10 years ago

Solved


design a magic matrix without using the command magic.
Like magic(4) = 16 3 2 13;5 10 11 8;9 6 7 12;4 15 14 1

10 years ago

Solved


Determine Whether an array is empty
Input a matrix x, output y is TRUE if x is empty, otherwise FALSE.

10 years ago

Load more