Gelöst


CARDS PROBLEM
Read my mind and tell me the card number that I have now in my hands.

fast 13 Jahre vor

Gelöst


Calculate the integral of the polynomial
for e.g. in = [3 2 1] out = [1 1 1 0]

fast 13 Jahre vor

Gelöst


Create Volcano (or Atoll) martix. It is an extension of Bullseye matrix problem.
For example, if n=2 (maximum value), the output matrix should be [1 1 1 1 1; 1 2 2 2 1; 1 2 1 2 1; 1 2 2 2 1; 1...

fast 13 Jahre vor

Gelöst


Change the sign
Given a matrix x, return one with each diagonal element replaced by its absolute value, and each off-diagonal element replaced b...

fast 13 Jahre vor

Gelöst


Circle area using pi
Given a circle's radius, compute the circle's area. Use the built-in mathematical constant pi.

fast 13 Jahre vor

Gelöst


COUNT VOWEL 2
The objective of this problem is to determine the number of unique vowels used in the given string. Now count vowels in STRI...

fast 13 Jahre vor

Gelöst


Number of odd and even elements within matrix
Input(m) - any matrix with integers Output(n) - n(1)=number of odd elements, n(2)=number of even elements Example: * m=...

fast 13 Jahre vor

Gelöst


How many digits are there?
Input(s) - any string Output(n) - number of digits within string s

fast 13 Jahre vor

Gelöst


calculate linear convolution two vectors
for e.g in: a = [1 2 3] b = [4 5 6] out: y = [4 13 28 27 18]

fast 13 Jahre vor

Gelöst


Simple problem creating a function from an abstract specification.
MYSTERYFUNCTION3 This takes a vector of numbers v and computes a vector w such the w[i] is the average of v[i] and the previous...

fast 13 Jahre vor

Gelöst


COUNT VOWEL
Count, how many times vowels occurred. EXAMPLE: x='string the MaTLaBiAn' then the answer will be 6. x='coUnt the vowEl' th...

fast 13 Jahre vor

Gelöst


Put Two 1D matrices into one 1D matrix
Example: If input a = [1 2 3 4 5]; input b = [10 9 8 7 6]; then output will be, y_correct = [1 10 2 9 3 8 4 7 5...

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Gelöst


Perl 4: unshift
_This is part of a series of perl function which were very helpful for many perl programmers. Could you implement it in Matlab?_...

fast 13 Jahre vor

Gelöst


Perl 3: shift
_This is part of a series of perl function which were very helpful for many perl programmers. Could you implement it in Matlab?_...

fast 13 Jahre vor

Gelöst


Perl 2: pop
_This is part of a series of perl function which were very helpful for many perl programmers. Could you implement it in Matlab?_...

fast 13 Jahre vor

Gelöst


sum of first 'n' terms
Given n=10, find the sum of first 'n' terms Example: If n=10, then x=1,2,3,4,5,6,7,8,9,10. The sum of these n=10 terms is 55...

fast 13 Jahre vor

Gelöst


Area of rhombus
Calculate the rhombus area

fast 13 Jahre vor

Gelöst


Procrustean bed
Given a vector x and an integer n, convert x to a vector of length n by (1) chopping off the end if it is too long, or (2) addin...

fast 13 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 13 Jahre vor

Gelöst


Do Fast Fourier Transformation
Example Fast Fourier Transformation from vector [2,1]) ans = 3 1

fast 13 Jahre vor

Gelöst


Volume and area of a sphere
Input(r) - radius Output([v,s]) - volume and area

fast 13 Jahre vor

Gelöst


Is the input divisible by 3?
Return true if the input is divisible by 3 and false if not.

fast 13 Jahre vor

Gelöst


The sum of the numbers in the vector
eg. [1,2,3]---->SUM=6

fast 13 Jahre vor

Gelöst


find the maximum element of the matrix
for e.g x = [1 2; 3 4] y = 4

fast 13 Jahre vor

Gelöst


Switch matrix to a column vector
for e.g. x = [1 2 3 4] y = 1 3 2 4

fast 13 Jahre vor

Gelöst


Frobenius Norm
Write your own version of Frobenius Norm without using the 'norm' function.

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Gelöst


How many jokers?
* Given DNA codes of a group of suspects, * and a code for certain types of jokers, * Count how many jokers of that type. * ...

fast 13 Jahre vor

Mehr laden