문제를 풀었습니다


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

대략 11년 전

문제를 풀었습니다


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

대략 11년 전

문제를 풀었습니다


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

대략 11년 전

문제를 풀었습니다


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

대략 11년 전

문제를 풀었습니다


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

대략 11년 전

문제를 풀었습니다


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

대략 11년 전

문제를 풀었습니다


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

대략 11년 전

문제를 풀었습니다


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

대략 11년 전

문제를 풀었습니다


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

대략 11년 전

문제를 풀었습니다


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

대략 11년 전

문제를 풀었습니다


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

대략 11년 전

문제를 풀었습니다


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

대략 11년 전

문제를 풀었습니다


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

대략 11년 전

문제를 풀었습니다


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

대략 11년 전

문제를 풀었습니다


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.

대략 11년 전

문제를 풀었습니다


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

대략 11년 전

문제를 풀었습니다


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

대략 11년 전

문제를 풀었습니다


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

대략 11년 전

문제를 풀었습니다


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

대략 11년 전

문제를 풀었습니다


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

대략 11년 전

문제를 풀었습니다


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

대략 11년 전

문제를 풀었습니다


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

대략 11년 전

문제를 풀었습니다


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

대략 11년 전

문제를 풀었습니다


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

대략 11년 전

문제를 풀었습니다


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

대략 11년 전

문제를 풀었습니다


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

대략 11년 전

문제를 풀었습니다


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

대략 11년 전

문제를 풀었습니다


Multi-line comments
* Fix the syntax errors.

대략 11년 전

문제를 풀었습니다


Comments
* Fix the syntax errors.

대략 11년 전

문제를 풀었습니다


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

대략 11년 전

더 보기