A résolu


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

environ 11 ans il y a

A résolu


Logical indexing: High scores
Row array gameScores contains all player scores. Construct a row array highScores than contains all player scores greater than 5...

environ 11 ans il y a

A résolu


Array resizing: Removing elements
* Remove elements 2, 4, and 6 from row array pendingTasks

environ 11 ans il y a

A résolu


Concatenating arrays
* Assign studentIDs with concatenated row arrays groupA and groupB

environ 11 ans il y a

A résolu


Adding an element: Ticker tape
* Add stockPrice to the beginning of row array tickerTape

environ 11 ans il y a

A résolu


Indexing the last element: Print queue
* Delete the last element of row array printQueue.

environ 11 ans il y a

A résolu


Variable sized row arrays
* Reverse the contents of row array mileMarkers

environ 11 ans il y a

A résolu


Indexing the array: Shift right with variable sized arrays
* Write a statement to shift the array contents 1 position to the left. * Assign the rightmost element with -1. Ex: [12, 85...

environ 11 ans il y a

A résolu


Linear-spaced points array
* Construct a row array plotPoints with 5 values that are spaced linearly from lowValue to highValue. Ex: If lowValue is 1 and ...

environ 11 ans il y a

A résolu


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

environ 11 ans il y a

A résolu


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

environ 11 ans il y a

A résolu


Relational operators and row arrays: Run times
* Construct a row array fastRunTimes containing all elements of runTimes equal to or less than 480 seconds. Ex: If runTimes =...

environ 11 ans il y a

A résolu


Comparing floating point values
* Assign matchFound with true if firstSample and secondSample are less than thresholdValue.

environ 11 ans il y a

A résolu


Concatenating strings
* Write a statement that assigns fullName with firstName, a space, then lastName. Ex: If firstName is Alan and lastName is Tu...

environ 11 ans il y a

A résolu


Constructing strings
* Construct a string alphaString from 'a' to endLetter, using the double colon operator. Ex: If endLetter = 'e', then alphaSt...

environ 11 ans il y a

A résolu


Constructing column arrays
* Construct a column array elevatorStops with values 2, 4, 5, 9, and 10

environ 11 ans il y a

A résolu


Column arrays: Transpose a row array
* Construct a row array countValues with elements 1 to endValue, using the colon operator. * Transpose countValues to result in...

environ 11 ans il y a

A résolu


Union of two set decreasing order
Union of two set decreasing order Say, x=[1 2 5] and y=[5 7 8] then answer must be [8 7 5 2 1]

environ 11 ans il y a

A résolu


Find out magnitude of vector
Find out magnitude of vector. Say x=[1 2 3], then answer must sqrt(1^2+2^2+3^2) Please don't use sum function. If you l...

environ 11 ans il y a

A résolu


Find out phase angle of second order system.
Find out the phase angle of a second order system. In a control system, the phase angle is given by the inverse of cos.

environ 11 ans il y a

A résolu


Y=X
Given an input variable x, output a variable y that is equal in value to x. Example: Input x = 1 Output y is 1 Inp...

environ 11 ans il y a

A résolu


Add 7
Given an input variable x, output a variable y that is 7 greater than x. Example: Input x = 1 Output y is 8 Input ...

environ 11 ans il y a

A résolu


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

environ 11 ans il y a

A résolu


Remove the Zero
Given an array n, remove all zeros

environ 11 ans il y a

A résolu


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

environ 11 ans il y a

A résolu


Find 10's complement
Find 10's complement of a given number. An example is <http://electrical4u.com/9s-complement-and-10s-complement/ shown here>.

environ 11 ans il y a

A résolu


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

environ 11 ans il y a

A résolu


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

environ 11 ans il y a

A résolu


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

environ 11 ans il y a

A résolu


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

environ 11 ans il y a

Charger plus