Solved


Matrix multiplication
Multiply two incoming matrices via matrix multiplication

nästan 5 år ago

Solved


Increment up an input vector
Increment up an input vector by adding the indices to the vector values. For example, if an input vector is [3, 2, 6, 1, 6], the...

nästan 5 år ago

Solved


Find 10's complement
Find 10's complement of a given number. An example is <http://electrical4u.com/9s-complement-and-10s-complement/ shown here>.

nästan 5 år ago

Solved


Replicate and Tile an Array
Replicate and tile an array. Example A = [1 2 3; 4 5 6; 7 8 9] B = Epli_and_Tile(A,1,2) B = [ 1 2 3 1...

nästan 5 år ago

Solved


Find Out sum of principal diagonal element of given matrix
Find out sum of principal diagonal element of given matrix If A=[1 0 0; 0 1 0;0 0 1], then answer must be 3.

nästan 5 år ago

Solved


Flipping a Matrix
Flipping matrix up and down. If a central row is exists, leave it, and flip remaining rows. Example Mat = magic(3) ...

nästan 5 år ago

Solved


Delete 2nd and 5th column of Given 6*6 matrix
Delete the 2nd and 5th columns of the given 6*6 matrix. Example Suppose A = magic(6) 35 1 6 26 19 ...

nästan 5 år ago

Solved


Sum positive elements of matrix.
Calculate sum of positive elements of the matrix.

nästan 5 år ago

Solved


Find the square of the sum of the digits of a number
If a number (n) is provided as an input, find the square of the sum of the digits of the number. Example If n = 21, the an...

nästan 5 år ago

Solved


Log of a number
Write a script that will give the log of x as output.

nästan 5 år ago

Solved


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

nästan 5 år ago

Solved


Energy-Mass Equivalence
Given input enegy of the object, E, and constant c = 300,000,000, find the mass of the object.

nästan 5 år ago

Solved


Ratio between sum of primer numbers and non-prime numbers
Write a function that calculates the ratio between the sum of the prime numbers lower or equal than x, and the sum of the non-pr...

ungefär 5 år ago

Solved


Sum of logarithms
Given a vector, v, of real positive numbers, compute the sum, s, of the base-10 logarithms of the elements of v, without the use...

ungefär 5 år ago

Solved


Pascal's Matrix
Given an integer n &ge; 0, generate the ( _n_+1) &times; ( _n_+1) lower triangular <http://en.wikipedia.org/wiki/Pascal_matrix P...

ungefär 5 år ago

Solved


Just another sum (JAS)
*Task:* Write a function that takes a vector X and returns the alternating sum of X: X(1)-X(2)+X(3)-X(4)+... *Example...

ungefär 5 år ago

Solved


Index one element in each vector of an array along a given dimension
Functions like min and max can return in their second output argument the index of the element in each vector along a particular...

ungefär 5 år ago

Solved


Find the position of first minimum value in an integer array with numbers
If x = [2 6 4 9 10 3 1 5 1] the the output should be 7, because the first minimum value (1) lies at the 7th position.

ungefär 5 år ago

Solved


Basics: Divide integers to get integer outputs in all cases
Divide integers a and b in such a way that output y is always an integer (in ceil manner)

ungefär 5 år ago

Solved


Find the last digit
FInd the last digit of a given number. Given number is the input and output should be the last digit of that number.

ungefär 5 år ago

Solved


Replace secondary diagonal elements of a square array
Replace all the secondary diagonal elements of the square array A with the number n Example: A = [1 2 3 4 5 6 ...

ungefär 5 år ago

Solved


Find remainder when x is divided by 3
Find remainder when x is divided by 3

ungefär 5 år ago

Solved


Create an anti-identity matrix
Create an anti-identity matrix of given dimension. Examples n = 2 A = [0 1; 1 0] n = 3 A = [0 0 1; 0 1 0; 1 0 0...

ungefär 5 år ago

Solved


Replace Negative(-) by 0 and positive by 1
In a given Matrix Replace all element having *Negative sign with 0* and *Positive elements with 1* .

ungefär 5 år ago

Solved


Funny problems
Generate the following vector: if n=1 then q=1; elseif n=2 then q=[2 2 1]; elseif n=3 then q=[3 3 3 2 2 1]; ... end

ungefär 5 år ago

Solved


Colon operator of two vectors
You are given two vectors of equal length: VecStart, VecEnd Each vector contain a set of integers, where VecEnd(j)>=VecStar...

ungefär 5 år ago

Solved


subtraction of two nos
given a and b, subtract and give the answer

ungefär 5 år ago

Solved


find the logic,easy one
find the logic behind, example x=18 y=306 x=53 y=2756

ungefär 5 år ago

Solved


Average of odd values
Find the average of odd values in given a matrix. e.g x=[ 4 11 8 ; 9 2 7 ] y =( 11 + 9+ 7 ) / 3

ungefär 5 år ago

Solved


vectors counting by 5
Create a vector with numbers from x_min to x_max in increments of 5.

ungefär 5 år ago

Load more