Solved


I want eval
A valid MATLAB statement containing a definition of a vector is passed as a string S. Determine the length of the vector. Inp...

10 years ago

Solved


Neither minima nor maxima
Input v is a vector. Return all the elements of v which are not a local minimum or maximum. Example: v = [1 2 3 4 5] Ou...

10 years ago

Solved


Generate this matrix
For a given odd integer n, generate a matrix as follows: Input: n = 5; Output: [ 2 1 0 0 0 1 ...

10 years ago

Solved


Convert a vector into numbers
Suppose a vector x = [ 1 2 4 7] is given. You have to convert this vector into string number y = '1247'. Examples x = [ 1...

10 years ago

Solved


What day is it?
Tell me what day is it. Return the full name of the day of the week as a string. e.g. It's June 12th 2014, so your function s...

10 years ago

Solved


Integer Sequence - 1
Check the test suite to determine the relationship between input integer scalar and output integer scalar.

10 years ago

Solved


Sort the vector with the given index
Given x = [1 2 4 8 17] and t = [1 3 2 5 4] then y = [1 4 2 17 8].

10 years ago

Solved


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

10 years ago

Solved


Replace Nonzero Numbers with 1
Given the matrix x, return the matrix y with non zero elements replaced with 1. Example: Input x = [ 1 2 0 0 0 ...

10 years ago

Solved


Elements with highest local average
Input v is a row vector such that length(v)>3. Consider a sliding window of length 3 that is used to calculate the local average...

10 years ago

Solved


Tic Tac Toe Solver
Create a function that checks n number of tic tac toe boards housed in a 3x3xn matrix where the x's are represented as 1's (and ...

10 years ago

Solved


row-th maximum row elements
Input a is a square matrix of size n*n. Output vector v is of size 1*n. The ith element of output v is the ith largest element o...

10 years ago

Solved


N-Dimensional Sorting
Given two N-dimensional matrices A and B, first sort A in increasing order and then sort B with respect to the index of A. Y...

10 years ago

Solved


Sort numbers by outside digits
Sort the array so that they are sorted as if their value was a 5 digit number made from the first three and last two digits of t...

10 years ago

Solved


Wrapping the Tower of Pisa
The famous artist Christo Vladimirov Javacheff, who likes pizza, wants to wrap the well-known Italian tower in paper. It is a ci...

10 years ago

Solved


Find maximum value of a curve
Two vectors shall be already defined: - Input vector x (e.g. x = 0:1:10) - Result vector y (e.g. y = sin(x)) Create a n...

10 years ago

Solved


Numbers spiral diagonals (Part 2)
Inspired by Project Euler n°28 and 58. A n x n spiral matrix is obtained by starting with the number 1 and moving to the righ...

10 years ago

Solved


Path calculation with polynomials
Let a vector x be the input to our function. 1. If a value of an input vector element x is lower than 0, set this value to 0....

10 years ago

Solved


Numbers spiral diagonals (Part 1)
Inspired by Project Euler n°28 et 58. A n x n spiral matrix is obtained by starting with the number 1 and moving to the right...

10 years ago

Solved


Sum the entries of each column of a matrix which satisfy a logical condition.
Given a numeric matrix A and a logical array L of the same size as A, return a row vector S containing the columnwise sums of th...

10 years ago

Solved


Vectorizing, too easy or too hard?
Please insert a . before any ^, * or / in the string. That's it!!

10 years ago

Solved


Is the Point in a Circle?
Check whether a point or multiple points is/are in a circle centered at point (x0, y0) with radius r. Points = [x, y]; c...

10 years ago

Solved


Angle of triangle
For three unknown points a b c, given three sides ab bc ca, find three angles abc bca cab in radians. Your function should b...

10 years ago

Solved


Transpose
Write a MATLAB script in order to convert a random length row vector (v) into a column vector.

10 years ago

Solved


letter yes yes & letter no no
Split a string into two strings, first string has all alphabetic letters, next string has all the rest, keep the order please, o...

10 years ago

Solved


matrix of natural number
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 resides seially as shown in the examples below. ...

10 years ago

Solved


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

10 years ago

Solved


Column norms of a matrix
Given a matrix M, return a vector y such that for each k y(k)=norm(M(:,k)) (y(k) is the Euclidean norm of the k-th col...

10 years ago

Solved


System of equations
Find a solution to a system of equations represented by a |n| by |n+1| matrix. For instance, [ 2 0 4; => 2*x = 4 ...

10 years ago

Solved


Twins in a Window
<http://en.wikipedia.org/wiki/Twin_primes Twin primes> are prime numbers that differ by 2, such as [11,13] or [41,43]. Write a f...

10 years ago

Load more