解決済み


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

約9年 前

解決済み


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

約9年 前

解決済み


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

約9年 前

解決済み


Multi-line comments
* Fix the syntax errors.

約9年 前

解決済み


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

約9年 前

解決済み


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

約9年 前

解決済み


Comments
* Fix the syntax errors.

約9年 前

解決済み


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

約9年 前

解決済み


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年 前

解決済み


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年 前

解決済み


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

約9年 前

解決済み


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

約9年 前

解決済み


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

約9年 前

解決済み


Declaring a character
* Assign middleInitial with the character T.

約9年 前

解決済み


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

約9年 前

解決済み


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

約9年 前

解決済み


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

約9年 前

解決済み


Logic variables
* Assign isAvailable with true.

約9年 前

解決済み


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

約9年 前

解決済み


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

約9年 前

解決済み


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

約9年 前

解決済み


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

約9年 前

解決済み


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

約9年 前

解決済み


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

約9年 前

解決済み


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

約9年 前

解決済み


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

約9年 前

解決済み


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]

約9年 前

解決済み


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

約9年 前

解決済み


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

約9年 前

解決済み


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

約9年 前

さらに読み込む