Gelöst


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

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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


Multi-line comments
* Fix the syntax errors.

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


Comments
* Fix the syntax errors.

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


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


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


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


Declaring a character
* Assign middleInitial with the character T.

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


Logic variables
* Assign isAvailable with true.

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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]

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Mehr laden