문제를 풀었습니다


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

6년 초과 전

문제를 풀었습니다


Counting Money
Add the numbers given in the cell array of strings. The strings represent amounts of money using this notation: $99,999.99. E...

6년 초과 전

문제를 풀었습니다


Binary numbers
Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...

6년 초과 전

문제를 풀었습니다


Roll the Dice!
*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...

6년 초과 전

문제를 풀었습니다


Balanced number
Given a positive integer find whether it is a balanced number. For a balanced number the sum of first half of digits is equal to...

6년 초과 전

문제를 풀었습니다


What percentage?
Calculate the output c as the percentage of a on b for given a and b.

6년 초과 전

문제를 풀었습니다


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

6년 초과 전

문제를 풀었습니다


inner product of two vectors
inner product of two vectors

6년 초과 전

문제를 풀었습니다


Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<http://upload....

6년 초과 전

문제를 풀었습니다


Find the alphabetic word product
If the input string s is a word like 'hello', then the output word product p is a number based on the correspondence a=1, b=2, ....

6년 초과 전

문제를 풀었습니다


Read a Soroban Abacus
*Description* The Soroban is the name of the modern Japanese abacus. Information on reading a Soroban can be found <http://we...

6년 초과 전

문제를 풀었습니다


Return the largest number that is adjacent to a zero
This example comes from Steve Eddins' blog: <http://blogs.mathworks.com/steve/2009/05/27/learning-lessons-from-a-one-liner/ Lear...

6년 초과 전

문제를 풀었습니다


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

6년 초과 전

문제를 풀었습니다


What's size of TV?
Many people buy TV. Usually they ask about diagonal. But also important are width and height. Let's assume that all TV have rati...

6년 초과 전

문제를 풀었습니다


Which doors are open?
There are n doors in an alley. Initially they are all shut. You have been tasked to go down the alley n times, and open/shut the...

6년 초과 전

문제를 풀었습니다


Basic commands - Least common multiple
Make a function which will return least common multiple of "a" and "b" Example: a=8; b=6; y=24;

6년 초과 전

문제를 풀었습니다


radius of a spherical planet
You just measured its surface area, that is the input.

6년 초과 전

문제를 풀었습니다


Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

6년 초과 전

문제를 풀었습니다


surrounded matrix
With a given matrix A (size m x n) create a matrix B (size m+2 x n+2) so that the matrix A is surrounded by ones: A = [1 2 ...

6년 초과 전

문제를 풀었습니다


Make an awesome ramp for a tiny motorcycle stuntman
Okay, given a vector, say v=[1 3 6 9 11], turn it into a matrix 'ramp' like so: m=[1 3 6 9 11; 3 6 9 11 0; 6 9 ...

6년 초과 전

문제를 풀었습니다


Remove NaN ?
input -> matrix (n*m) with at least one element equal to NaN; output -> matrix(p*m), the same matrix where we deleted the enti...

6년 초과 전

문제를 풀었습니다


Back to basics 21 - Matrix replicating
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, generate an output matrix that consists o...

6년 초과 전

문제를 풀었습니다


Fibonacci-Sum of Squares
Given the Fibonacci sequence defined by the following recursive relation, * F_n = F_(n-1) + F_(n-2) * where F_0 = 0 and F_1 ...

6년 초과 전

문제를 풀었습니다


Target sorting
Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...

6년 초과 전

문제를 풀었습니다


Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

6년 초과 전

문제를 풀었습니다


Remove the vowels
Remove all the vowels in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill' Output s2 is 'Jck nd Jll wn...

6년 초과 전

문제를 풀었습니다


The Goldbach Conjecture
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

6년 초과 전

문제를 풀었습니다


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

6년 초과 전

문제를 풀었습니다


Area of a Square
Inside a square is a circle with radius r. What is the area of the square?

6년 초과 전

문제를 풀었습니다


Simple equation: Annual salary
Given an hourly wage, compute an annual salary by multiplying the wage times 40 and times 50, because salary = wage x 40 hours/w...

6년 초과 전

더 보기