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


Form a gaussian kernel using matrix size and sigma value
For example matrix = 3; sigma = 1.2; Gaussian kernel = [1 2 1; 2 2 2; 1 2 1]; ...

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


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


Find Sign(Zero Crossing) Changes in Array
Example; A = [1 2 3 -3 -4 -1 -24 2 4 -1 -2 3 1]; ans; [1 2 0 -3 -4 -1 0 2 0 -1 ...

etwa 11 Jahre vor

Gelöst


Interior angles
Find the sum of interior angles for polygon of x sides.

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


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


Integer indexing array: Shift left
Write a *single* statement that shifts row array attendanceValues one position to the left. The rightmost element in shiftedValu...

etwa 11 Jahre vor

Gelöst


Smallest and Largest Real Numbers
Complete the function by assigning minReal with the smallest positive double precision floating-point number, and maxReal with t...

etwa 11 Jahre vor

Gelöst


Box!
Given a box, find the volume of the cube. With each side = a.

etwa 11 Jahre vor

Gelöst


Indexing the array: Moving values
* Write three statements to shift the array contents 1 position to the left. * The rightmost element should be assigned -1.

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

etwa 11 Jahre vor

Gelöst


Logical indexing: Player scores
Player 1 and player 2 take turns playing a game. Row array gameScores contains the scores of player 1, then player 2, then playe...

etwa 11 Jahre vor

Gelöst


Double colon operator: Increment by x
* Construct a row array countValues from 0 to 25, elements incremented by incrementValue. Ex: If incrementValue is 5, countVa...

etwa 11 Jahre vor

Gelöst


Integer indexing array: Reverse subsets
Construct an indexing array copySubset so that the statement reversedOrder = origOrder(copySubset); results in a row array begin...

etwa 11 Jahre vor

Gelöst


Tree Height
Assign treeHeight with the tree height given the shadow length and angle of elevation. Simple geometry can compute the heigh...

etwa 11 Jahre vor

Gelöst


Double colon operator: Counting up
* Construct a row array countValues from 1 to endValue, using the double colon operator. Ex: If endValue is 5, countValues s...

etwa 11 Jahre vor

Gelöst


Integer indexing array: Weekend box office
The row array movieBoxOffice stores the amount of money a movie makes (in millions of $) for the 7 days of a week, starting with...

etwa 11 Jahre vor

Gelöst


Test if a matrix is symmetric
Write a logical function that returns 1 if the input matrix is symmetric and 0 otherwise.

etwa 11 Jahre vor

Gelöst


Indexing an array element
* Assign currentStudent with the second element of array testScores.

etwa 11 Jahre vor

Gelöst


Double colon operator: Counting down
* Construct a row array countValues from startValue to endValue, elements decremented by -2 end Ex: If startValue is 10 and ...

etwa 11 Jahre vor

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


Multi-line comments
* Fix the syntax errors.

etwa 11 Jahre vor

Gelöst


Comments
* Fix the syntax errors.

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

Mehr laden