Resuelto


Create a vector whose elements depend on the previous element
The idea is to create a vector A whose elements depend on the previous element : *A(i+1) = 2*A(i)+1* *2 Inputs*: - A : The...

más de 1 año hace

Resuelto


Finding peaks
Find the peak values in the signal. The peak value is defined as the local maxima. For example, x= [1 12 3 2 7 0 3 1 19 7]; ...

más de 1 año hace

Resuelto


Create an n-by-n null matrix and fill with ones certain positions
The positions will be indicated by a z-by-2 matrix. Each row in this z-by-2 matrix will have the row and column in which a 1 has...

más de 1 año hace

Resuelto


Unique values without using UNIQUE function
You must return unique values in a vector in *stable* mode without using the unique function. About stable order flag: ...

más de 1 año hace

Resuelto


Find nth maximum
Find nth maximum in a vector of integer numbers. Return NaN if no such number exists. x = [2 6 4 9 -10 3 1 5 -10]; So ...

más de 1 año hace

Resuelto


Find last zero for each column
Given a numeric array of arbitrary size, return the row index of the last zero for each column. If a column contains all nonzero...

más de 1 año hace

Resuelto


Count consecutive 0's in between values of 1
So you have some vector that contains 1's and 0's, and the goal is to return a vector that gives the number of 0's between each ...

más de 1 año hace

Resuelto


Calculate the Number of Sign Changes in a Row Vector (No Element Is Zero)
For a row vector: V=[7 1 2 -3] there is one sign change (from 2 to -3). So, the function you write must return N=1. F...

más de 1 año hace

Resuelto


Symmetry of vector
Determine whether the vector is symmetric or not (vector could be even or odd in length). For example: x = [1 2 3 3 2 1] is s...

más de 1 año hace

Resuelto


Find similar sequences
Another problem inspired by a question on the <http://www.mathworks.com/matlabcentral/answers answers> forum. Given a matrix ...

más de 1 año hace

Resuelto


Mersenne Primes vs. All Primes
A Mersenne prime (M) is a prime number of the form M = 2^p - 1, where p is another prime number. <https://www.mathworks.com/matl...

más de 1 año hace

Resuelto


Approximation of Pi (vector inputs)
Pi (divided by 4) can be approximated by the following infinite series: pi/4 = 1 - 1/3 + 1/5 - 1/7 + ... For a given numbe...

más de 1 año hace

Resuelto


Generate Square Wave
Generate a square wave of desired length, number of complete cycles and duty cycle. Here, duty cycle is defined as the fraction ...

más de 1 año hace

Resuelto


Sum of series VII
What is the sum of the following sequence: Σ(km^k)/(k+m)! for k=1...n for different n and m?

más de 1 año hace

Resuelto


Sum of series VI
What is the sum of the following sequence: Σk⋅k! for k=1...n for different n?

más de 1 año hace

Resuelto


Sum of series V
What is the sum of the following sequence: Σk(k+1) for k=1...n for different n?

más de 1 año hace

Resuelto


Sum of series IV
What is the sum of the following sequence: Σ(-1)^(k+1) (2k-1)^2 for k=1...n for different n?

más de 1 año hace

Resuelto


Sum of series III
What is the sum of the following sequence: Σ(2k-1)^3 for k=1...n for different n?

más de 1 año hace

Resuelto


Sum of series II
What is the sum of the following sequence: Σ(2k-1)^2 for k=1...n for different n?

más de 1 año hace

Resuelto


Approximation of Pi
Pi (divided by 4) can be approximated by the following infinite series: pi/4 = 1 - 1/3 + 1/5 - 1/7 + ... For a given number of...

más de 1 año hace

Resuelto


Sum of series I
What is the sum of the following sequence: Σ(2k-1) for k=1...n for different n?

más de 1 año hace

Resuelto


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

más de 1 año hace

Resuelto


The Birthday Phenomenon
First off, leap years are not being considered for this. In fact the year that people are born shouldn't be taken into considera...

más de 1 año hace

Resuelto


Throwing Dice - Will You Be Eaten By The Dragon?
You and a dragon have agreed to let dice rolls determine whether it eats you or not. The dragon will roll a single die, of x ...

más de 1 año hace

Resuelto


Chess probability
The difference in the ratings between two players serves as a predictor of the outcome of a match (the <http://en.wikipedia.org/...

más de 1 año hace

Resuelto


Estimating Euler's (Oi-ler-z) Number
Euler's number is an irrational constant given by Starting with x=0, count the number of times you can add a uniformly distrib...

más de 1 año hace

Resuelto


Next Tribonacci Number
The "Tribonacci" sequence is an extension of the idea of the Fibonacci sequence: That is, each new term is the sum of the thr...

más de 1 año hace

Resuelto


Generate Tribonacci Sequence
The "Tribonacci" sequence is an extension of the idea of the Fibonacci sequence: That is, each new term is the sum of the thr...

más de 1 año hace

Resuelto


Generate Pascal's Triangle Matrix
Pascal's triangle is an arrangement of numbers where each value is the sum of the values adjacent to it in the previous row: ...

más de 1 año hace

Resuelto


Interpolated Value Between Two Points
Given two points, and , a new location x, and a method "linear" or "cubic", return the value of a linear or cubic interpolant t...

más de 1 año hace

Cargar más