解決済み


Who is the smartest MATLAB programmer?
Who is the smartest MATLAB programmer? Examples: Input x = 'Is it Obama?' Output = 'Me!' Input x = 'Who ?' Ou...

8年弱 前

解決済み


Solving Quadratic Equations (Version 1)
Quadratic equations have the form: ax^2 + bx + c = 0. Example: x^2 + 3x + 2 = 0, where a = 1, b = 3, and c = 2. The equation has...

8年弱 前

解決済み


Find max
Find the maximum value of a given vector or matrix.

8年弱 前

解決済み


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

8年弱 前

解決済み


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

8年弱 前

解決済み


Multi-line comments
* Fix the syntax errors.

8年弱 前

解決済み


Indexing an array element
* Assign currentStudent with the second element of array testScores. _Reminder: Array indexing starts with 1._

8年弱 前

解決済み


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

8年弱 前

解決済み


Remove DC
Input x is the sampled signal vector, may have both AC and DC components. Output y should not contain any DC component. Examp...

8年弱 前

解決済み


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

8年弱 前

解決済み


Rotate a Matrix
Input a Matrix x, Output y is the matrix rotating x 90 degrees clockwise

8年弱 前

解決済み


Multiply a column by a row
* Given a column vector C and and a row vector R. * Output a matrix M. * Every column of M equals to C multiplied by correspon...

8年弱 前

解決済み


Duplicate each element of a vector.
for an n-dimensional vector x, the function should return another vector 2n-dimension which each element is repeated twice. Ex...

8年弱 前

解決済み


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

8年弱 前

解決済み


Declaring a string
* Assign streetAddress with the string 1313 Mockingbird Lane.

8年弱 前

解決済み


Arrange vector in ascending order
Arrange a given vector in ascending order. input = [4 5 1 2 9]; output = [1 2 4 5 9];

8年弱 前

解決済み


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

8年弱 前

解決済み


Back to basics 12 - Input Arguments
Covering some basic topics I haven't seen elsewhere on Cody. Return a value equal to the number of input arguments to the fun...

8年弱 前

解決済み


Love triangles
Given a vector of lengths [a b c], determines whether a triangle with non-zero area (in two-dimensional Euclidean space, smarty!...

8年弱 前

解決済み


Back to basics 22 - Rotate a matrix
Covering some basic topics I haven't seen elsewhere on Cody. Rotate the input matrix 90 degrees counterclockwise (e.g. [1 2; ...

8年弱 前

解決済み


Rotate a Matrix by 90 degrees
Rotate a Matrix by 90 degrees Example: If the input is: X = 1 2 3 4 5 6 7 8 9 ...

8年弱 前

解決済み


Find common elements in matrix rows
Given a matrix, find all elements that exist in every row. For example, given A = 1 2 3 5 9 2 5 9 3 2 5 9 ...

8年弱 前

解決済み


Relational operators: Guessing game
Row array userGuess contains a sequence of user guesses. Create a logical indexing array correctGuess with true in each location...

8年弱 前

解決済み


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

8年弱 前

解決済み


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

8年弱 前

解決済み


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

8年弱 前

解決済み


Back to basics 10 - Max Float
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive floating-point number MATLAB can han...

8年弱 前

解決済み


Who knows the last digit of pi?
There is only one man who knows the last digit of pi, who is that man? Give the name of that man, who, by popular believe, can ...

8年弱 前

解決済み


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

8年弱 前

解決済み


Test for balanced parentheses
Given the input inStr, give the boolean output out indicating whether all the parentheses are balanced. Examples: * If ...

8年弱 前

さらに読み込む