A résolu


Combine Data With Gaps
Combine data sets a and b where the datasets have "gaps" or unique points. Example: Input a = [1,0; 2,1; ...

environ 2 ans il y a

A résolu


Hard limit function
Classify x data as if x>=0 then y=1 if x<0 then y=0 Example x = [ -2 -1 0 1 2] y = [ 0 0 1 1 1]

environ 2 ans il y a

A résolu


Replace values out of an interval with the lower or upper values
For a vector or matrix X and an interval [n1,n2], the function replace every element of x inferior to n1 by n1, and every elemen...

environ 2 ans il y a

A résolu


P-smooth numbers
This Challenge is to find <https://en.wikipedia.org/wiki/Smooth_number P-smooth number> partial sets given P and a max series va...

environ 2 ans il y a

A résolu


Determine if input is a perfect number
A perfect number occurs whent the sum of all divisors of a positive integer, except the number itself, equals the number. Examp...

environ 2 ans il y a

A résolu


First N Perfect Squares
*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];

environ 2 ans il y a

A résolu


The Top 5 Primes
This problem series invites you to solve two simple problems related to the integer NUMBER FIVE, in order to celebrate <https://...

environ 2 ans il y a

A résolu


Weave two matrices together to form one matrix
Take the first column from matrix a, then insert the first column from matrix b, and so on. For example: a = [1 2 3 4]; b ...

environ 2 ans il y a

A résolu


S-T-R-E-T-C-H I-T O-U-T
You will be given a row of numbers (x), and a single number (n). Your job is to write a script that will stretch out the row of...

environ 2 ans il y a

A résolu


Zero Cross
Write a function that counts the number of times n a signal x changes sign. Examples x = [1 2 -3 -4 5 6 -7 8 -9 10 11] ...

environ 2 ans il y a

A résolu


generate number in particular way
A = [1 5 2 7]; MAX = 10; generate a array Y = [1 2 2 2 2 2 3 3 4 4]; i.e. total eleme...

environ 2 ans il y a

A résolu


Find the sum of the elements in the "second" diagonal
Find the sum of the elements in the diagonal that starts at the top-right corner and ends at the bottom-left corner.

environ 2 ans il y a

A résolu


Calculate the sum of two polynomials
Calculate the sum of two polynomials if they are written in notation with their coefficients. example: () + () = a=[3 4 ...

environ 2 ans il y a

A résolu


Please check the last row
We have data of matrix, that is input. That contains 2 or more rows and the last row should contain the average of each column,...

environ 2 ans il y a

A résolu


Vector pop
Take |n| elements from the end of the vector |v| and return both the shorten vector |v| and the |n| elements in a separate vecto...

environ 2 ans il y a

A résolu


Vector push
Append an element |x| to the end of the vector |v| and return both the extended vector and the new number of its elements. |x| c...

environ 2 ans il y a

A résolu


Perl 1: push
_This is part of a series of perl function which were very helpful for many perl programmers. Could you implement it in Matlab?_...

environ 2 ans il y a

A résolu


Determinant without using det()
Given a square matrix A, compute the <http://en.wikipedia.org/wiki/Determinant determinant> of A. Note that you may not use t...

environ 2 ans il y a

A résolu


Raise a polynomial to a power
In Matlab, polynomials are represented by a vector of coefficients. For example, the polynomial p=a*x^2 + b*x + c is represente...

environ 2 ans il y a

A résolu


Let's get back to school, and create multiplication tables
For a given range, create multiplication tables. (start is always < endno) Example start = 17 endno = 19 Then, ...

environ 2 ans il y a

A résolu


Sum the 'edge' values of a matrix
Sum the 'edge' values of an input matrix (the values along the perimeter). Example [1 2 3 4 5 6 7 8 9] Output = ...

environ 2 ans il y a

A résolu


Determine if input is a valid AHP evaluation matrix
Input is a matrix. Output is a true or false statement (1 or 0). Return true if input is a valid Analytic Hierarchy Process eval...

environ 2 ans il y a

A résolu


Diagonal Pattern
For a positive integer |n|, return an |nXn| matrix |mat| such that the value of each element in row |i| and column |j| is given ...

environ 2 ans il y a

A résolu


Make a rainbow matrix (follow-up to checkerboard matrix)
Given an integer n, make an n-by-n matrix as shown below. The a(1,1) should be 0. As we move away from the top-left, the number ...

environ 2 ans il y a

A résolu


Union Jack Matrix
Create a matrix of odd dimensions that has ones on both diagonals and dividing the matrix into 4 quadrants, resembling a square ...

environ 2 ans il y a

A résolu


Vandermonde Matrix
Create the Vandermonde Matrix of the given vector. The matrix consists of columns as powers of the vector, so the first column i...

environ 2 ans il y a

A résolu


Tent matrix
Create an n x n matrix that resembles one kind of tent. The variable n is provided to the function and will be an odd number. As...

environ 2 ans il y a

A résolu


create a square matrix
create a [n*n] matrix. example: mat(4)= [ 1 4 9 16 4 4 9 16 9 9 ...

environ 2 ans il y a

A résolu


Create a square matrix with given conditions
Create a square matrix, M, which should be populated as follows: M = [ n^2 n * (n-1) n * (n-2) ... n * 2 n * ...

environ 2 ans il y a

A résolu


Form a square matrix from four square sub-matrices
Create a square matrix, y, from 4 square sub-matrices that will be constructed (x1, x2, x3, x4): y = [x1 x2; x3 x4]; ...

environ 2 ans il y a

Charger plus