Gelöst


Number Puzzle - 111

11 Monate vor

Gelöst


Write script that gives matrix like the following example:)
if x=2; y=[2 1; 1 1] if x=4; y=[4 3 2 1 3 3 2 1 0 2 2 1 0 0 1 1] if x=5; y=[5 4 3 2 ...

11 Monate vor

Gelöst


Find the square root of x
Determine the square root of x. For example square root of 4 is 2.

11 Monate vor

Gelöst


Add Odd and Subtract Even Numbers in an Array
For an input array, add all the odd values and subtract the even values. The final value is the output. E.g. input = [1 2 3 4 ...

11 Monate vor

Gelöst


Diophantine Equations (Inspired by Project Euler, problem 66)
Consider the quadratic Diophantine equation of the form: x^2 – Dy^2 = 1 When D=13, the minimal solution in x is 649^2 – 13...

12 Monate vor

Gelöst


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

12 Monate vor

Gelöst


Some tweaks in summation, Can you decode? :)
There are some tweaks in summation that you might observe via test suites Try if you can

12 Monate vor

Gelöst


Basics - not so easy division
Please make a function whcih divides x/y, but pay attention for some exceptions with NaN,0,Inf. Sometimes return "ERROR" instead...

12 Monate vor

Gelöst


Beat the test suite if you can :)
Solve this problem based on clues in the test suite.

12 Monate vor

Gelöst


Recursion at variable input
input of any length a =2 b =2 c =3 output = (a^b)^c = 64

12 Monate vor

Gelöst


Compute circular convolution
In signal processing, we usually encounter the circular convolution case. Compute it here using the two input sequences (denoted...

12 Monate vor

Gelöst


Insert certain elements into a vector.
We start with vector V. Some values W will be inserted into V, at positions U. Say, |V| contains |[1 2 3 4 5]| and |W| is |[0...

12 Monate vor

Gelöst


Ackermann's Function
Ackermann's Function is a recursive function that is not 'primitive recursive.' <http://en.wikipedia.org/wiki/Ackermann_fun...

12 Monate vor

Gelöst


Radial Zernike polynomials
Given an integer _n_ &ge; 0 and an integer _m_ &ge; 0, generate the <http://en.wikipedia.org/wiki/Zernike_polynomials radial Zer...

12 Monate vor

Gelöst


Hermite Polynomials
Return the _n_-th <http://en.wikipedia.org/wiki/Hermite_polynomials Hermite polynomial> of the physicists' type. Assume that ...

12 Monate vor

Gelöst


James Bond film count
Twenty-three James Bond films have been produced, in the years 1962, 1963, 1964, 1965, 1967, 1969, 1971, 1973, ... 197...

12 Monate vor

Gelöst


Still more miles to go before I sleep
It's time for more odometer fun. Last problem, my car's odometer hit 56789. It's coming up on 111111 now, which (barring a maj...

12 Monate vor

Gelöst


Expand 10^n to Powers of 4
Given an integer n, return the coefficients c = [c_n,c_n-1,...,c_0] Such that 10^n = c_n*4^(n) + c_n-1*4^(n-1...

12 Monate vor

Gelöst


Muphry's Law of MATLAB
You're running some simple multiplication problems through MATLAB for error checking purposes, but nothing seems to come up with...

12 Monate vor

Gelöst


Fun with matrix
Design a sample matrix as given in the test cases

etwa ein Jahr vor

Gelöst


Find the numeric characters in a string and return their index
Given a string S, return the index of any numeric characters. S = 'The next meeting will be held in 2 weeks.'; idx = fin...

etwa ein Jahr vor

Gelöst


Decrypt the cypher using XOR encryption (for beginners)
Inspired by Project Euler n°59 Each character on a computer is assigned a unique code and the preferred standard is ASCII (...

etwa ein Jahr vor

Gelöst


From a given cell array of strings, extract the non-unique strings.
We are given a cell array of strings C. From this cell array we require to extract the subset of non-unique strings, returning t...

etwa ein Jahr vor

Gelöst


generate the matrix
given a value n (say 4) - generate the matrix like below y= [0 1 2 3 4; -1 0 1 2 ...

etwa ein Jahr vor

Gelöst


How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for.

etwa ein Jahr vor

Gelöst


Convert RGB to Grayscale
Convert a 3 element RGB array to its correspoding grayscale pixel (a scalar) *Hint: a formula exists!

etwa ein Jahr vor

Gelöst


how many of the entries are positive?
Given x= sin(linspace(0,10*pi,100)), how many of the entries are positive?

etwa ein Jahr vor

Gelöst


Sum of Positive Elements in a Matrix
Given a matrix A, write a function that returns the sum of all positive elements in A. Input: A = [-3, 4, -1; 6, -2, 8] ...

etwa ein Jahr vor

Gelöst


PIN code II
A cell phones requires a PIN code to open which only includes numbers; how long (in terms of minutes) does it take to enter all ...

etwa ein Jahr vor

Gelöst


Conditional transpose
You're given two vectors of the same length, x and y, which might be row or a column vectors. Your task is to ensure that y has ...

etwa ein Jahr vor

Mehr laden