Resuelto


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

alrededor de 11 años hace

Resuelto


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

alrededor de 11 años hace

Resuelto


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

alrededor de 11 años hace

Resuelto


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

alrededor de 11 años hace

Resuelto


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

alrededor de 11 años hace

Resuelto


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

alrededor de 11 años hace

Resuelto


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

alrededor de 11 años hace

Resuelto


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

alrededor de 11 años hace

Resuelto


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

alrededor de 11 años hace

Resuelto


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

alrededor de 11 años hace

Resuelto


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

alrededor de 11 años hace

Resuelto


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

alrededor de 11 años hace

Resuelto


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

alrededor de 11 años hace

Resuelto


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

alrededor de 11 años hace

Resuelto


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.

alrededor de 11 años hace

Resuelto


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

alrededor de 11 años hace

Resuelto


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

alrededor de 11 años hace

Resuelto


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

alrededor de 11 años hace

Resuelto


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

alrededor de 11 años hace

Resuelto


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

alrededor de 11 años hace

Resuelto


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

alrededor de 11 años hace

Resuelto


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

alrededor de 11 años hace

Resuelto


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

alrededor de 11 años hace

Resuelto


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

alrededor de 11 años hace

Resuelto


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

alrededor de 11 años hace

Resuelto


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

alrededor de 11 años hace

Resuelto


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

alrededor de 11 años hace

Resuelto


Multi-line comments
* Fix the syntax errors.

alrededor de 11 años hace

Resuelto


Comments
* Fix the syntax errors.

alrededor de 11 años hace

Resuelto


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

alrededor de 11 años hace

Cargar más