문제를 풀었습니다


Prime number check (★★)
One way to see if a number x is prime is to compute the remainders obtained when dividing x by all integers from 2 to √(x). If x...

2개월 전

문제를 풀었습니다


Determinant of a 3x3 Matrix
Return the determinant of a 3x3 matrix. The built-in Matlab function det is not allowed.

2개월 전

문제를 풀었습니다


Check if a year is a leap year or not
Return 1 if a given year is a leap year or 0 if it is not

2개월 전

문제를 풀었습니다


Remove DC
Input x is the sampled signal vector, may have both AC and DC components. Output y should not contain any DC component. Examp...

2개월 전

문제를 풀었습니다


Horizontal matrix sort
Given a matrix x with n rows and m columns, return a matrix y with n rows and 2m columns, such that every row in x is sorted fro...

2개월 전

문제를 풀었습니다


Power of n ?
Determine if x (positive integer) is a power of n, return true or false accordingly.

2개월 전

문제를 풀었습니다


Calculate sin(x) without sin(x)
Calculate y = sin(x) x = 0 -> y= 0 without the use of sin(x) or cos(x)

2개월 전

문제를 풀었습니다


Tridiagonal
Return an n-by-n matrix that has a, b, c as the subdiagonal, main diagonal, and superdiagonal entries in the matrix. Example ...

2개월 전

문제를 풀었습니다


Linear Motion 7
A robot has a maximum rate of acceleration of a m/s2. If the robot starts from rest and reaches a velocity of v2 m/s. How far ha...

2개월 전

문제를 풀었습니다


Linear Motion 6
An experimental vehicle traveling at v1 m/s is brought to a full stop in t seconds. How far does it travel before stopping? Roun...

2개월 전

문제를 풀었습니다


Number Puzzles - 006

2개월 전

문제를 풀었습니다


Rotate matrix by coloumns

2개월 전

문제를 풀었습니다


Grandpa's telescope
Two grandkids Dorothy and Benjamin are sharing a telescope made by their grandpa, who used an old lens of spectacles as the obje...

2개월 전

문제를 풀었습니다


Opposite point of the earth, what is the antipodal of a point ?
Given two strings(lat and long) that represent the geographic coordinates of a point in the earth, you have to find out what is ...

2개월 전

문제를 풀었습니다


Cookie Cutters
Given a larger and smaller matrix, perform element-by-element multiplication on the smaller matrix and a sub-matrix of the large...

2개월 전

문제를 풀었습니다


Jack's hand in "Titanic" ♤
Given a series of cards, return true if it's the famous hand. Note that i pretend that poker cards goes from 1 to 10 so be care...

2개월 전

문제를 풀었습니다


balance vector
Given a non-empty vector x with integer elements. x shall be called balance vector if one can split the elements of x into two g...

2개월 전

문제를 풀었습니다


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

2개월 전

문제를 풀었습니다


Periodic Table II 101.
Given the symbol of an element, return its atomic number. This is the continuation of <http://www.mathworks.com/matlabcentral/co...

2개월 전

문제를 풀었습니다


Cricket - How Much More to Beat Bradman?
Sir Don Bradman famously needed only 4 runs in his final innings to retire with an average of 100. Out for a duck, he ended inst...

2개월 전

문제를 풀었습니다


Scrabble Scores - 2
An <https://www.mathworks.com/matlabcentral/cody/problems/56-scrabble-scores introductory Cody problem> asks the user to score a...

2개월 전

문제를 풀었습니다


Detect a number and replace with two NaN's
Write code which replaces the number 1 with two NaNs. Example X = [ 1 2 NaN 4 1 3 7 NaN 1 4 NaN 2] ...

2개월 전

문제를 풀었습니다


Additive persistence
Inspired by Problem 2008 created by Ziko. In mathematics, the persistence of a number is the *number of times* one must apply...

2개월 전

문제를 풀었습니다


Number Puzzle - 094
Give an example of three unique numbers a, b, and c such that concatenating a^2, b^2, and c^2 is equal to d^4 for an integer d.

2개월 전

문제를 풀었습니다


is the number happy?
test is a given integer number is Happy of not? answer 1 if yes or 0 is no

2개월 전

문제를 풀었습니다


Adjoint matrix
given a matrix a, find the adjoint matrix of a.

2개월 전

문제를 풀었습니다


Kurchan 5x5 - Optimal Score
Related to Problems 1646 and 2650, but bigger. Technically, all you need to do for this Cody problem is input a 5x5 matrix conta...

2개월 전

문제를 풀었습니다


Getting logical indexes
This is a basic MATLAB operation. It is for instructional purposes. --- Logical indexing works like this. thresh = 4...

2개월 전

문제를 풀었습니다


Resistance of a robot
What is the resistance of an industrial robot that draws P watts of power when connected to a power supply delivering V volts? R...

2개월 전

문제를 풀었습니다


Consecutive Powers
Return 2 numbers and 2 powers such that their difference is 1 A 4 element row vector is expected: x where x(1)^x(2) - x(...

2개월 전

더 보기