A résolu


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

plus de 11 ans il y a

A résolu


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

plus de 11 ans il y a

A résolu


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

plus de 11 ans il y a

A résolu


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

plus de 11 ans il y a

A résolu


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

plus de 11 ans il y a

A résolu


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

plus de 11 ans il y a

A résolu


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.

plus de 11 ans il y a

A résolu


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

plus de 11 ans il y a

A résolu


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

plus de 11 ans il y a

A résolu


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

plus de 11 ans il y a

A résolu


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

plus de 11 ans il y a

A résolu


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

plus de 11 ans il y a

A résolu


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

plus de 11 ans il y a

A résolu


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

plus de 11 ans il y a

A résolu


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

plus de 11 ans il y a

A résolu


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

plus de 11 ans il y a

A résolu


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

plus de 11 ans il y a

A résolu


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

plus de 11 ans il y a

A résolu


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

plus de 11 ans il y a

A résolu


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

plus de 11 ans il y a

A résolu


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

plus de 11 ans il y a

A résolu


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

plus de 11 ans il y a

A résolu


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

plus de 11 ans il y a

A résolu


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

plus de 11 ans il y a

A résolu


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

plus de 11 ans il y a

A résolu


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

plus de 11 ans il y a

A résolu


Negative Infinity
Round the given array a towards negative infinity.

plus de 11 ans il y a

A résolu


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

plus de 11 ans il y a

A résolu


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

plus de 11 ans il y a

A résolu


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

plus de 11 ans il y a

Charger plus