Solved

N-th Odious
Given index n return n-th <https://oeis.org/A000069 odious number>.

circa 6 anni ago

Solved

Evil Number
Check if a given natural number is evil or not. Read more at <https://oeis.org/A001969 OEIS>.

circa 6 anni ago

Solved

Matlab Basics - Assigning Variables
Assign different types of data to variables: integer, double, and strings Example: A is a double, for example 2.34 B is a...

circa 6 anni ago

Solved

Matlab Basics - Switching Assignments
Switch assignments for variables x and y, for example start with x = 1 and y = 3 end with y = 1 and x = 3 Do NOT simply r...

circa 6 anni ago

Solved

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

circa 6 anni ago

Solved

Matlab Basics - Rounding II
Write a script to round a variable x to 3 decimal places: e.g. x = 2.3456 --> y = 2.346

circa 6 anni ago

Solved

Self-similarity 2 - Every third term
Self-similar integer sequences are certain sequences that can be reproduced by extracting a portion of the existing sequence. Se...

circa 6 anni ago

Solved

Self-similarity 1 - Every other term
Self-similar integer sequences are certain sequences that can be reproduced by extracting a portion of the existing sequence. Se...

circa 6 anni ago

Solved

Prime Letters = Removing
Given a string, remove all the letters which in ASCII Code are prime numbers. For Example: s1 = 'Determine which array e...

circa 6 anni ago

Solved

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

circa 6 anni ago

Solved

Positive Infinity
Round the array a towards positive infinity

circa 6 anni ago

Solved

Compare two input matrices
Check which input matrix has more elements. Return "1" if matrix A has more elements than matrix B. Otherwise return "0". Exa...

circa 6 anni ago

Solved

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

circa 6 anni ago

Solved

Circle area using pi
Write a statement that assigns circleArea with the circle's area given circleRadius. Use the built-in mathematical constant pi. ...

circa 6 anni ago

Solved

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

circa 6 anni ago

Solved

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

circa 6 anni ago

Solved

Plus x: A first program
_Solve this problem in Mathwork's online Cody system._ Write a statement that assigns y with 5 plus x. Ex: If input x = 2,...

circa 6 anni ago

Solved

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

circa 6 anni ago

Solved

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

circa 6 anni ago

Solved

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

circa 6 anni ago

Solved

Nearest
*Description* Find the value and index of the element in vector _x_ that is nearest to value _y_. _y_ should be able to be a ...

circa 6 anni ago

Solved

Matlab Basics II - Count rows in a matrix
Write a function that returns that number of rows in a vector or matrix x example: x = [1; 2; 3] output = 3

circa 6 anni ago

Solved

Matlab Basics II - Find the roots of a function
Write a function that finds where a curve crosses zero (the x-axis) to two decimal places Example: <<http://s14.postimg.o...

circa 6 anni ago

Solved

Matlab Basics II - Intervals
Write a function that takes an interval from a to b, and divides it into 5 parts example: a = 1, b = 2 output = 1 1.25 ...

circa 6 anni ago

Solved

Matlab Basics II - Extract last 3 elements of a vector
Let x be a vector of unknown length, we are always interested in the last 3 numbers in the vector, write a function that gives t...

circa 6 anni ago

Solved

Matlab Basics II - Create a vector with a repeated entry
Create a row vector of length n, filled with 4's, for example, if n = 3 output = [4 4 4] make sure to round UP when n is a...

circa 6 anni ago

Solved

Matlab Basics II - Minimum
Write a function that returns the minimum of each ROW of a matrix x example: x = [1 2 3; 4 5 6]; output [1;4];

circa 6 anni ago

Solved

Matlab Basics II - Max & Index of Max
Write a function that takes a vector x, then returns both the max value in x and its location in the vector for example x ...

circa 6 anni ago

Solved

Find the product of a Vector
How would you find the product of the vector [1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0] times 2?; x = [1 : 0.5 : 6]; y ...

circa 6 anni ago

Solved

Volume of a box
Given a box with a length a, width b, and height c. Solve the volume of the box.

circa 6 anni ago