Solved


Free passes for everyone!
_Simply return the name of the coolest numerical computation software ever_ *Extra reward* (get a _freepass_): As an addit...

9 years ago

Solved


I want to know everything!
I am always a little bit paranoid. Now, I want to know what my co-workers do with my MATLAB when I am not here. Find (i...

9 years ago

Solved


Mirror, mirror on the wall, who is fairest of them all?
The Elo rating system was featured in the movie *The Social Network* during the <https://www.youtube.com/watch?v=BzZRr4KV59I/ al...

9 years ago

Solved


sum of digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 ...

9 years ago

Solved


Ring Matrix
Given n (only odd), return output a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. ...

9 years ago

Solved


Should Mr McNugget even get out of bed today?
As we learned in <http://www.mathworks.com/matlabcentral/cody/problems/42888-frobenius-mcnugget-factorization an earlier problem...

9 years ago

Solved


Frobenius McNugget Factorization
Mr. Frobenius McNugget is a peculiar man. As you might expect, he likes to eat Chicken McNuggets. But his love of number the...

9 years ago

Solved


Integer complexity (Large numbers)
Inspired by <http://www.mathworks.com/matlabcentral/cody/problems/42831-integer-complexity Problem 42831>, this problem aims to ...

9 years ago

Solved


Return the sequence element I
Given a positive integer, x, return a positive integer, y, which is the xth term in the sequence [1 2 2 3 3 3...], in which one ...

9 years ago

Solved


Return the sequence element II
Given positive integers x and n, return a positive integer, y, which is the nth term in the <https://en.wikipedia.org/wiki/Juggl...

9 years ago

Solved


Juggler sequence revisited
This problem is related to <http://www.mathworks.com/matlabcentral/cody/problems/42835-return-the-sequence-element-ii Problem 42...

9 years ago

Solved


Find the stride of the longest skip sequence
We define a _skip sequence_ as a regularly-spaced list of integers such as might be generated by MATLAB's <http://www.mathworks....

9 years ago

Solved


Increasing sub-sequence (Level 2)
This is the next step up from <http://www.mathworks.com/matlabcentral/cody/problems/42837-increasing-sub-sequence-level-1 Proble...

9 years ago

Solved


Would Homer Like It?
Given a matrix of ones and zeros, you must determine if there are any doughnuts present (would Homer Simpson like it?). A doughn...

9 years ago

Solved


Reduce - Map-Reduce
Write reduce function, that takes arguments and constantly folds results into next call argument, finally returning a value; ...

9 years ago

Solved


Hexagonal Tiling Dots in a Circle
Return how many <http://en.wikipedia.org/wiki/Hexagonal_grid Hexagonal Tiling> grid points there are inside a circle of radius _...

9 years ago

Solved


ismember: Enhanced Performance for 'rows' and width - Speed Scoring (66% savings)
The Challenge is to perform very fast the 'ismember' function for a long and wide array. The width of the array is expanded fro...

9 years ago

Solved


Dick Van Dyck?
* Not the celebrity, <http://en.wikipedia.org/wiki/Dick_Van_Dyke Dick Van Dyke>, * this problem relates to balanced strings of...

9 years ago

Answered
I have a n X 2 matrix, but I want remove the points with a distance smaller than a threshold. And the data is random, which means the data position may be very far in the matrix but their distance is very close. Can anyone help me?
dataOut = uniquetol(dataIn, tolerance, 'ByRows', true); Above code should be a good starting point. In this case it would b...

9 years ago | 0

| accepted

Answered
Is there a way for breaking a loop iteration, if it takes to long?
One of the simplest ways for time control is to use tic and toc time0 = tic; timeLimit = 60*60*1; % 1 hour == 3600 secon...

9 years ago | 1

Solved


Cellular Automaton | Rule X
Cellular Automata (CA) provide a convenient way to represent many kinds of systems in which the values of cells (either 0 or 1) ...

9 years ago

Solved


테스트
(x,y) 점들의 집합 (pts)이 주어져 있을때 같은 선위에 있지 않은 한점을 찾아서 몇번째 있는지 그 행수를 출력 (outlier) 하는 함수 spot_the_outlier 를 작성하라. 예: 입력, 총...

9 years ago

Solved


테스트 문제
다음과 같은 일을 수행하는 사용자 정의 함수 switchrow 를 짜라. y = switchrow(x, a, b) 입력으로 행렬 x을 받으면 x의 a행과 b행을 바꿔서 출력하는 switchrow 사용자 정의 함수를 짜라...

9 years ago

Solved


테스트
벡터 x가 주어져 있으면 전체 벡터의 총합의 반을 만들어 주는 원소들 (y)을 출력하는 함수 subsub 을 작성하라 예) 입력 x = [1 2 3 4 5 6 7] 출력 y = [1 6 7] 이유 : ...

9 years ago

Solved


테스트
어떤 수 (10진수)가 입력 (x)으로 들어오면 이 수를 이진수로 변환했을때 1의 갯수를 출력하는 함수 your_fcn_name 를 작성하라. 예) x=215 이면 이를 이진수로 변환하면 11010111 이므로 ...

9 years ago

Solved


테스트
입력으로 어떤 수 (n) 이 주어져 있다면 그 수의 약수의 갯수 (y)를 출력하는 함수 your_fcn_name 을 작성하라 예) n=14 이면 약수가 1,2,7,14 이므로 y=4 n=68 이면 약수가 1...

9 years ago

Solved


테스트
입력으로 a, b, c를 주면 a*x^2 + b*x + c = 0. 의 해 (x)를 출력해주는 함수 solution 을 작성하라. 예) a=1, b=2, c=1 이면 x=-1

9 years ago

Solved


테스트
입력으로 벡터 x와 정수 n이 주어진 다면 벡터 x에서 n번째로 큰 수 (y)를 출력하는 함수 n_max(x, n) 를 작성하라. 만일 그런 수가 없다면 NaN (not a number)를 출력하면 된다. 예...

9 years ago

Solved


테스트
다음과 같은 벡터를 1,2,2,3,3,3,4,4,4,4 만드는 사용자 정의 함수 your_fcn_name 을 작성하시오. 이 벡터는 그 숫자가 그 갯수 만큼 있다. 예) 만일 입력 n=3이면 3까지...

9 years ago

Solved


테스트
만일 어떤 벡터 v가 0부터 0까지의 값들만 원소로 갖는다고 할때 [3 4 2 9] ---> 3429 [1 3 5] ---> 135 와 같이 벡터를 수로 변환하는 함수 digits2Number 를 ...

9 years ago

Load more