Gelöst


Infernal Recursion
Consider the recursion relation: x_n = (x_(n-1)*x_(n-2))^k Given x_1, x_2, and k, x_n can be found by this definition. Wr...

fast 12 Jahre vor

Gelöst


collision
several cars (n) were involved in this collision, the input matrix (vm) has n rows and two columns, first column for velocity an...

fast 12 Jahre vor

Gelöst


find the roots of a quadratic equation
for e.g x = [ 2 -1 -3] y = [1.5 -1]

fast 12 Jahre vor

Gelöst


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

fast 12 Jahre vor

Gelöst


Figurate number triangle
Check whether the input matrix is a figurate number triangle: <http://mathworld.wolfram.com/FigurateNumberTriangle.html>

fast 12 Jahre vor

Gelöst


Vector of numbers divisible by 3
* Input(n) - any integer * Output(v) - vector with numbers divisible by 3(exept 0) starting from n to 0 Examples: * n=6...

fast 12 Jahre vor

Gelöst


subtract central cross
Given an n-by-n square matrix, where n is an odd number, return the matrix without the central row and the central column.

fast 12 Jahre vor

Gelöst


Half-Swap
Given a vector with an even number of elements, rearrange it so that the elements in its first half are switched with those i...

fast 12 Jahre vor

Gelöst


Find and replaces spaces from a input string with *
For a given input string str, find how many spaces are there in the string and replace those spaces with * e.g. str = 'this is ...

fast 12 Jahre vor

Gelöst


Angle between Two Vectors
The dot product relationship, a dot b = | a | | b | cos(theta), can be used to determine the acute angle between vector a and ve...

fast 12 Jahre vor

Gelöst


Back to basics - mean of corner elements of a matrix
Calculate the mean of corner elements of a matrix. e.g. a=[1 2 3; 4 5 6; 7 8 9;] Mean = (1+3+7+9)/4 = 5

fast 12 Jahre vor

Gelöst


Create an index-powered vector
Given a input vector x, return y as index-powered vector as shown below. Example x = [2 3 6 9] then y should be [...

fast 12 Jahre vor

Gelöst


wait for me
wait exactly x seconds please, need not be more than 2 seconds but must be accurate within say 50 milliseconds, your function mu...

fast 12 Jahre vor

Gelöst


Count decimal digits of a number
* Given an integer number you have to return the number of its digits. * For example 248 has 3 digits and 1589 has 4 digits ...

fast 12 Jahre vor

Gelöst


Volume of a sphere given its surface area
You just measured its surface area, that is the input.

fast 12 Jahre vor

Gelöst


frame of the matrix
Given the matrix M, return M without the external frame.

fast 12 Jahre vor

Gelöst


Create a random logical vector of N elements of which M are true.
Your task for tomorrow is to create a random binary (logical) vector of N elements of which M are true. For example: ran...

fast 12 Jahre vor

Gelöst


Finding peaks
Find the peak values in the signal. The peak value is defined as the local maxima. For example, x= [1 12 3 2 7 0 3 1 19 7]; ...

fast 12 Jahre vor

Gelöst


sinus function
x is the abscissa. find the absolute value of cosine of -x and the same value with changed sign.

fast 12 Jahre vor

Gelöst


reverse string
input='rama' output='amar'

fast 12 Jahre vor

Gelöst


newRMS
find root mean square of a signal x in less time than the test code and accurate to six places.

fast 12 Jahre vor

Gelöst


Rotate input square matrix 90 degrees CCW without rot90
Rotate input matrix (which will be square) 90 degrees counter-clockwise without using rot90,flipud,fliplr, or flipdim (or eval)....

fast 12 Jahre vor

Gelöst


Check if equal
Return true if all the elements of an nD array are equal, false otherwise.

fast 12 Jahre vor

Gelöst


Area of a triangle
A triangle is given with base *'b'* ,vertical hight *'h'* . then find it's area.

fast 12 Jahre vor

Gelöst


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

fast 12 Jahre vor

Gelöst


Convert Fahrenheit to Celsius
Calculate the Celsius temperature C given the Fahrenheit temperature F. Examples: Input F = 90 Output C is 32.22 I...

fast 12 Jahre vor

Gelöst


Negative Infinity
Round the given array a towards negative infinity.

fast 12 Jahre vor

Gelöst


Create a matrix X, where each column is a shifted copy of the vector v
Example : in->v = (1:5)'; 1 2 3 4 5 out-> [1 5 4 3 2;2 1 5 4 3;3 2 1 5 4;4 3 2 1 5;5 4 3 ...

fast 12 Jahre vor

Gelöst


Calculate the derivative of a polynomial
Example: in = [ 1 1 1 ] out = [ 2 1 ]

fast 12 Jahre vor

Gelöst


Find matching parenthesis
One of the most indispensable things about a great text editor for programming is the ability to quickly jump between matching p...

fast 12 Jahre vor

Mehr laden