Solved


Sum sum!!!
Sum the numbers from 1 to n

4 years ago

Solved


calculate the length of matrix
input 1 array, calculate the length

4 years ago

Solved


Find the max element of the array
Find the max element of the array

4 years ago

Solved


Duplicate all elements in the array
Duplicate all elements in the array

4 years ago

Solved


to the 2 all elements
to the 2 all elements

4 years ago

Solved


Check prime numbers
Let x, return 1 if x is a prime number, 0 otherwise e.g x = 7, return y =1; x = 6 return y = 0;

4 years ago

Solved


Repeat elements of a vector
Repeat each elements of a given vector according to their values. say x=[1,2,1,3] y=[1,2,2,1,3,3,3]

4 years ago

Solved


Square
square root of x

4 years ago

Solved


factorial
calculate x!

4 years ago

Solved


Calculate Resistance 2
In this problem, you have to calculate Resistance R of a linear conductor having voltage V across it and current I is passing i...

5 years ago

Solved


Invert a 3D rigid-body transformation
Given an SE(3) matrix representing a rigid-body motion, compute its inverse without using |inv()| or |pinv()| .

5 years ago

Solved


Create a 3D rotation matrix
Consider an arbitrary coordinate frame {A}. Consider another coordinate frame {B} which has the same origin as {A} but is rotat...

5 years ago

Solved


anshil's problem
Only anshil should solve ans = ''

5 years ago

Solved


Angle between two vectors
Given 2 pairs of _cartesian co-ordinates_, determine the angle between the 2 vectors formed by the _points_ and the _origin_. An...

5 years ago

Solved


Add 3 numbers
In this problem, you have to add three numbers a, b and c. Give output d = add(a,b,c)

5 years ago

Solved


Ratio between sum of primes and sum of factors
Write a function that calculates the ratio between the sum of primes numbers lower or equal to x, and the sum of the factors of ...

5 years ago

Solved


Change the first and last diagonal element of the identity matrix to zero
Starting with the identity matrix, change first and last diagonal element to zero. Example If n=5 A = 0 0 ...

5 years ago

Solved


Replace values under a limit
For a vector x and number n, the goal is to find every element of x inferior to n and replace it by n. Example x= [ 1 2 3...

5 years ago

Solved


Add one raw in given matrix as shown in example
*Add one raw in given matrix as shown in example* A=[1 0;0 1]; X=[3 5]; Answer must be:[1 0; 0 1;3 5]

5 years ago

Solved


Narcissistic problem
How many likes has this problem?

5 years ago

Solved


Golden ratio
Calculate the golden ratio. Hint: phi^2 = phi + 1.

5 years ago

Solved


Additive persistence
Inspired by Problem 2008 created by Ziko. In mathematics, the persistence of a number is the *number of times* one must apply...

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

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

5 years 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)

5 years ago

Solved


How many Integers?
Count the integers in a given vector |v|. You *must* use a loop to count each element separately. Examples: Input: v...

5 years ago

Solved


Relative ratio of "1" in binary number
Input(n) is positive integer number Output(r) is (number of "1" in binary input) / (number of bits). Example: * n=0; r=...

5 years ago

Solved


Perimeter
Given a sequence of points forming a closed path (first and last points are coincident) return the perimeter value. For example...

5 years ago

Solved


Matlab Basics II - Extract last 3 elements of a vector
Let x be a vector of unknown length, we are always interested in the last 3 numbers in the vector, write a function that gives t...

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

5 years ago

Load more