Solved


Global usage
This Challenge is to utilize Global variables. Global variables are risky as the subroutine may inadvertently and unwantingly...

4 years ago

Solved


Find the summation, mean, median, mode and standard deviation of a given array.
An array is given. Find out the summation, mean, median, mode and standard deviation of a given array. If x=[1,2,2,3,3,3,4,4,4,...

4 years ago

Solved


Magic!
Check whether the input matrix is a normal magic square: <http://en.wikipedia.org/wiki/Magic_square> Output the logical va...

4 years ago

Solved


Right and wrong
Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...

4 years ago

Solved


BASICS - sum part of vector
Please make a function, where as input you get vector "x" and and vector "c", where in "c" vector you get indexes to sum. Examp...

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

4 years ago

Solved


Power of n ?
Determine if _x_ (positive integer) is a power of _n_, return true or false accordingly.

4 years ago

Solved


function to compute root mean square of first nn positive odd integers
Write a function called odd_rms that returns orms, which is the square root of the mean of the squares of the first nn positive ...

4 years ago

Solved


find number of times of occurrence of the most frequent number in a row vector
In a given row vector, find the number of times a mode of a row vector has occurred example: in [2 5 5 5 5 3], output is 4 ...

4 years ago

Solved


basic matrix operations: rotate and find sum of diagonal elements of the resultant matrix
For given input matrix a, rotate it by 90 degrees and find the sum of the diagonals. Example: Input: a = 1 ...

4 years ago

Solved


Rotate array 90 degrees
Rotate the given matrix by 90 degrees. Example, A = [1 2 3 ; 4 5 6 ] B = rotated(A) = [ 3 6; 2 5; 1 4 ]

4 years ago

Solved


Sum two matrices
Take two incoming matrices, and sum them

4 years ago

Solved


Sum of unique multiples of 3 and 5
If we list all the natural numbers up to 15 that are multiples of 3 or 5, we get 3, 5, 6, 9, 10, 12 and 15. The sum of these mul...

4 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?

4 years ago

Solved


kmph to mph converter
Convert the speed in miles/hour to km/hour.

4 years ago

Solved


Roots of a quadratic equation.
Calculate the roots of a quadratic equation, given coefficients a, b, and c, for the equation a*x^2 + b*x + c = 0.

4 years ago

Solved


Determine the roots of a cubic equation
Given the coefficients a, b, c, and d of a cubic equation, a*x^3 + b*x^2 + c*x + d = 0, determine its roots.

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

4 years ago

Solved


Energy of an object
Calculate the total mechanical energy of an object. Total Energy= Potential energy + Kinetic energy P.E.=m*g*h K.E.=1/2...

4 years ago

Solved


Display negative numbers
Given array,x, display all the negative numbers and display output as y. Example x=[1 -2 3 -4] , output is y=[-2 -4].

4 years ago

Solved


Nth root
Nth root of a number x

4 years ago

Solved


Cube root of max value in a vector
Find the cube root of the maximum value in a vector

4 years ago

Solved


Add consecutive integer numbers
Given consecutive numbers, add the numbers *without using the sum command in MATLAB.*

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

4 years ago

Solved


factorial
calculate x!

4 years ago

Solved


Find the next square number
Given one or more integers n, find the next integer that is a square, for each of them. Example 1: n = 1; out = 4; ...

4 years ago

Solved


Matrix Pattern 3

4 years ago

Solved


Delete the column with all 0 !
Delete the column with all 0 data in a matrix(x). e.g. input x = 1 0 0 4 5 0 7 0 ...

4 years ago

Solved


leap year
find the number of leap years within the given time interval

4 years ago

Load more