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

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


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]

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


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.

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


Remove the Zero
Given an array n, remove all zeros

casi 11 años hace

Resuelto


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

casi 11 años hace

Resuelto


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

casi 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

casi 11 años hace

Resuelto


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

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

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

casi 11 años hace

Cargar más