Solved


Simple Vector Addition
Take two incoming vectors and output the sum of the two vectors

8 years ago

Solved


Sum two real numbers
It seems easy, but... You cannot use +, -, plus, diff, cumsum, *, prod, times, etc.

8 years ago

Solved


Average valid values of arrays
Given a 1D array (column or row vector), compute the average of valid values. Valid values are defined via two thresholds: minVa...

8 years ago

Solved


Matrix multiplication
Multiply two incoming matrices via matrix multiplication

8 years ago

Solved


Calculate the values of a polynomial.
Calculate the values of a polynomial.Input parameter p - vector of polynomial coefficients, x - matrix of the argument values. ...

8 years ago

Solved


Pad zero between every adjacent values of the vector.
you are given a vector x. you have to make an output vector y with zeros padded between every adjacent values of x. e.g x: ...

8 years ago

Solved


Percentage profit:2
If you are selling at x dollar, you are facing r1% profit; what will be the selling price for making r2% profit?

8 years ago

Solved


Second smallest number
What is the second smallest number in x? example: x = [1 2 3 4 5 6 7 8 9] y = 2

8 years ago

Solved


Odd row
Create a row 'y' with odd numbers where the potential maximum number is given by 'x' and the space between them by 'm'. The firs...

8 years ago

Solved


Vector Element Multiplication
Take two incoming vectors, and output the element wise multiplication of the vectors.

8 years ago

Solved


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

8 years ago

Solved


How do you make seven even?
Take away the s.

8 years ago

Solved


Find the sum of the largest two elements in a vector
With this one, you have to find the two largest elements in a vector and output the sum of those numbers.

8 years ago

Solved


calculate interest saved because of reduction of interest rate
calculate interest saved because of a reduction of interest rate per year (Assuming No leap year) Currently, in India, rate o...

8 years ago

Solved


Calculate roots of polynomial given as vector array.
Calculate roots of polynomial given as vector array. Example x=[1 2 0 5 0 3] result=[-2.7267 ; ...

8 years ago

Solved


Calculate the hypotenuse of a right triangle without using ^ and sqrt ()
Find out the hypotenuse of right triangle. Say a = 4, b = 3 then c = 5 Please don't use ^ and sqrt() function.

8 years ago

Solved


Detect pair of equal values in a Matrix
A 2D matrix of 2 rows and N columns with random integer numbers. A = [3 1 2 4 6 6 7; 7 3 2 1 5 2 4] ...

8 years ago

Solved


Geometric Series
Given x and n, give the sum of x ^ 1 to x ^ n. You should not have to use a loop for this.

8 years ago

Solved


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

8 years ago

Solved


Percentage profit
If you are buying at x dollar, what will be the selling price for making the r% profit?

8 years ago

Solved


To convolve two vectors
To convolve two vectors

8 years ago

Solved


Find the Kronecker Tensor Product without using KRON
The Kronecker Tensor Product is the result of multiplying all elements of a matrix with each of the elements of another matrix. ...

8 years ago

Solved


Get all corner elements from a matrix where dimension of matrix is always equal to or greater than 2.
if a given matrix a = [1 2 3;4 5 6]; so answer is going to be [1 3;4 6]

8 years ago

Solved


Create Vector containing following elements
Create Vector containing following elements A=[pi eps NaN inf -inf flintmax];

8 years ago

Solved


Transpose of matrix
Transpose of matrix as per test cases

8 years ago

Solved


Vertically stack two vectors
Stack two vectors on top of each-other so that... if A = [1 5 3] and B = [8 6 4] then C = [1 5 3 ; 8 6 4]

8 years ago

Solved


Determine the Anti-diagonal of a Magic Square
Determine the anti-diagonal (crossing from top right to lower left) of a magic square of size n. Examples If n = 3 y =...

8 years ago

Solved


Sunday bonus
Submit a solution on any Sunday and you will get 10 points. Only for MATLAB fans!

8 years ago

Solved


Calculate the integral of the polynomial
for e.g. in = [3 2 1] out = [1 1 1 0]

8 years ago

Solved


Matlab Basics II - 3 Dimensional Arrays
Assume x is a 3D array with n pages, representing students in a class, for each student (page in the array, the 3rd dimension), ...

8 years ago

Load more