문제를 풀었습니다


Number Puzzle - 111

11개월 전

문제를 풀었습니다


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개월 전

문제를 풀었습니다


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

11개월 전

문제를 풀었습니다


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개월 전

문제를 풀었습니다


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개월 전

문제를 풀었습니다


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개월 전

문제를 풀었습니다


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개월 전

문제를 풀었습니다


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개월 전

문제를 풀었습니다


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

12개월 전

문제를 풀었습니다


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

12개월 전

문제를 풀었습니다


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

12개월 전

문제를 풀었습니다


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개월 전

문제를 풀었습니다


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

12개월 전

문제를 풀었습니다


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개월 전

문제를 풀었습니다


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

12개월 전

문제를 풀었습니다


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개월 전

문제를 풀었습니다


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개월 전

문제를 풀었습니다


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개월 전

문제를 풀었습니다


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개월 전

문제를 풀었습니다


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

대략 1년 전

문제를 풀었습니다


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

대략 1년 전

문제를 풀었습니다


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

대략 1년 전

문제를 풀었습니다


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

대략 1년 전

문제를 풀었습니다


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

대략 1년 전

문제를 풀었습니다


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.

대략 1년 전

문제를 풀었습니다


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

대략 1년 전

문제를 풀었습니다


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

대략 1년 전

문제를 풀었습니다


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

대략 1년 전

문제를 풀었습니다


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

대략 1년 전

문제를 풀었습니다


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

대략 1년 전

더 보기