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 10 años hace

Resuelto


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

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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


Make one big string out of two smaller strings
If you have two small strings, like 'a' and 'b', return them put together like 'ab'. 'a' and 'b' => 'ab' For extra ...

casi 10 años hace

Resuelto


Find the area of a rectangle if length of the diagonal is given.
if length of a diagnonal in rectangle is 5. Its area is 12.

casi 10 años hace

Resuelto


find the relation...
if given input is 1, output is 4. if input is 55, output is 3136.

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


Divide by 4
Given the variable x as your input, divide it by four and put the result in y.

casi 10 años hace

Resuelto


Area of a triangle
A triangle is given with base *'b'* ,vertical hight *'h'* . then find it's area.

casi 10 años hace

Resuelto


CONVERT TAN TO SIN
In a right angle triangle ABC given the tan(A) then find sin(A) For example tan(A)=3/4 then sin(A)=3/5

casi 10 años hace

Resuelto


Determine the square root
Determine the square root of the value the user has entered, n.

casi 10 años hace

Resuelto


Evaluating a polynomial
Given the following polynomial and the value for x, determine y. y = 3x^5 – x^3 + 8x – 3 Example x = 1 y = 3 - 1 +...

casi 10 años hace

Resuelto


07 - Common functions and indexing 6
Create a variable _m_ as a magic square with the size 6 x 6 Magic squares are defined as square matrices, where the sum of a...

casi 10 años hace

Resuelto


Find the hypotenuse
Given a and b (the two sides of a right-triangle), find c, the hypotenuse.

casi 10 años hace

Resuelto


Remainder
Make 'y' equal to the remainder of 27 divided by 5. When x=27 and t=5

casi 10 años hace

Resuelto


Sum of the Matrix Elements
Add up all the elements in a NxM matrix where N signifies the number of the rows and M signifies the number of the columns. E...

casi 10 años hace

Resuelto


Matlab Basics - Absolute Value
Write a script that returns the absolute value of the elements in x e.g. x = [-1 -2 -3 -4] --> y = [1 2 3 4]

casi 10 años hace

Resuelto


Matlab Basics - Rounding I
Write a script to round x DOWN to the next lowest integer: e.g. x = 2.3 --> x = 2 also: x = 2.7 --> x = 2

casi 10 años hace

Resuelto


Matlab Basics - Sum a vector
Write a script to add up all the elements in a vector e.g. x = [1 2 3 4] --> output = 10

casi 10 años hace

Resuelto


Matlab Basics - y as a function of x
write a script to calculate y as a function of x, such that y = 6x^2 + 5x - 2

casi 10 años hace

Resuelto


Counting down
Create a vector that counts from 450 to 200 in increments of 10.

casi 10 años hace

Resuelto


peta to nano (x-ray)
for certain x-ray radiation, given frequency in petahertz, give wavelength in nanometer, must be accurate +/- 25%

casi 10 años hace

Resuelto


Deleting an element in a matrix
For vector Grades=[98 56 78 34 100 88 87], delete the number 78 to get the following matrix Grades=[98 56 34 100 88 87] **re...

casi 10 años hace

Resuelto


Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
The given function returns the index of the maximum value in a given matrix. such as X=[4,3,4,5,9,12,0,5] Ans= 6 if maxim...

casi 10 años hace

Resuelto


07 - Common functions and indexing 2
Define _eMat_: <<http://samle.dk/STTBDP/Assignment1_3e.png>> Calculate eMean as the mean across the rows of _eMat_. The an...

casi 10 años hace

Resuelto


Temperature conversion
Convert temperature in degrees Celsius (C) to temperature in degrees Kelvin (K). Assume your answer is rounded to the nearest Ke...

casi 10 años hace

Resuelto


What percentage?
Calculate the output c as the percentage of a on b for given a and b.

casi 10 años hace

Resuelto


find the maximum element of the matrix
for e.g x = [1 2; 3 4] y = 4

casi 10 años hace

Cargar más