Solved


Max of a Vector
Write a function to return the max of a vector

12 months ago

Solved


Duplicate each element of a vector.
for an n-dimensional vector x, the function should return another vector 2n-dimension which each element is repeated twice. Ex...

12 months ago

Solved


Count ones
Write a program to count number of ones (1s) in an integer variable input. For example: Input x=2200112231 output y=3 I...

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

12 months ago

Solved


Summation of array
Given an array, Find the sum of all of the elements in it Examples: Input x = [1 2 3 5; 4 5 6 7]; Output y is 33

12 months ago

Solved


Find the index of nth maximum of a row vector of real numbers
Given a vector of real numbers x, find the index idx of _n_ th maximum value. If nth maximum occurs more than once, return the i...

12 months ago

Solved


Square wave average calculation
Given its peak and duty cycle, calculate avg value of square wave

12 months ago

Solved


Average of square wave
given positive and negative peak , calculate dc level, 50% duty cycle

12 months ago

Solved


Negative matrix
Change the sign of all elements in given matrix.

12 months ago

Solved


Sum the numbers on the main diagonal
Sum the numbers on the main diagonal of an n-by-n matrix. For input: A = [1 2 4 3 6 2 2 4 7]...

12 months ago

Solved


Find the nearest integer
Given a vector of integers and a real number find the closest integer. EX: >> a = [2 4 5 6 8 10]; >> b = 4.6; >> nea...

12 months ago

Solved


Find the largest value in the 3D matrix
Given a 3D matrix A, find the largest value. Example >> A = 1:9; >> A = reshape(A,[3 1 3]); >> islargest(A) a...

12 months ago

Solved


square root
Find the square root (y) of an input (x).

12 months ago

Solved


Summing digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

12 months ago

Solved


So many choices
For inputs _n_ and _k_ (in that order), output the number of ways that k objects can be chosen from amongst n distinct objects. ...

12 months ago

Solved


Min of a Matrix
Return the minimum value in the given matrix.

12 months ago

Solved


The Hitchhiker's Guide to MATLAB
Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".

12 months ago

Solved


Product of elements in row
Product of matrix such that a=[3 3 1] b=9

12 months ago

Solved


Integer or Float?
Test an input to see whether it is an integer or a floating point number. If it is an integer return 1 for 'true'. Otherwise ret...

12 months ago

Solved


Mirror Image matrix across anti-diagonal
Given an input number x, create a mirror image matrix 'Y' across the anti-diagonal. For example, if x=3, Y = [1 2 3; ...

12 months ago

Solved


Who has power to do everything in this world?
There is only one person who is older than this universe. He is Indian version of Chuck Norris.

12 months ago

Solved


Palindrome numbers
Find the palindrome numbers (two or more digits) from 1 to n where n is the number passed to the function.

12 months ago

Solved


Find the area of the four walls
If length, breadth and height of the walls are given, find the area of the four walls.

12 months ago

Solved


Create the following sequence : 0 1 1 4 9 25 64 169 ...
The sequence 0, 1, 1, 4, 9, 25, 64, 169, ... represents the square of the sequence of Fibonacci numbers. Let n repres...

12 months ago

Solved


Palindrome Check
Check whether the entire matrix is palindrome or not. Example matrix = [7 8 7] matrix_reverse = [7 8 7] So the mat...

12 months ago

Solved


Reverse a matrix
Its simple. You have to reverse a given matrix.

12 months ago

Solved


find whether it is prime or not
For a given number find if its prime

12 months ago

Solved


Rotate a matrix for 180 degree
Rotate a matrix for 180 degree for eg: x=[1 2 3 4] y=[4 3 2 1]

12 months ago

Solved


Arrange vector in ascending order
Arrange a given vector in ascending order. input = [4 5 1 2 9]; output = [1 2 4 5 9];

12 months ago

Solved


Find the sum of n squares
What is the sum of the squares of the first n integers?

12 months ago

Load more