문제를 풀었습니다


Find the Oldest Person in a Room
Given two input vectors: * |name| - user last names * |age| - corresponding age of the person Return the name of the ol...

4년 초과 전

문제를 풀었습니다


Convert from Fahrenheit to Celsius
Given an input vector |F| containing temperature values in Fahrenheit, return an output vector |C| that contains the values in C...

4년 초과 전

문제를 풀었습니다


Circular Primes (based on Project Euler, problem 35)
The number, 197, is called a circular prime because all rotations of the digits: 197, 971, and 719, are themselves prime. The...

4년 초과 전

문제를 풀었습니다


Get all prime factors
List the prime factors for the input number, in decreasing order. List each factor. If the prime factor occurs twice, list it as...

4년 초과 전

문제를 풀었습니다


There are 10 types of people in the world
Those who know binary, and those who don't. The number 2015 is a palindrome in binary (11111011111 to be exact) Given a year...

4년 초과 전

문제를 풀었습니다


Converting binary to decimals
Convert binary to decimals. Example: 010111 = 23. 110000 = 48.

4년 초과 전

문제를 풀었습니다


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;

4년 초과 전

문제를 풀었습니다


Remove from a 2-D matrix all the rows that contain at least one element less than or equal to 4
Example: in = magic(5) in = 17 24 1 8 15 23 5 7 14 16 4 6 13 20 ...

4년 초과 전

문제를 풀었습니다


Put two time series onto the same time basis
Use interpolation to align two time series onto the same time vector. This is a problem that comes up in <http://www.mathwork...

대략 5년 전

문제를 풀었습니다


Longest run of consecutive numbers
Given a vector a, find the number(s) that is/are repeated consecutively most often. For example, if you have a = [1 2 2 2 1 ...

대략 5년 전

문제를 풀었습니다


ZigZag matrix with reflected format
ZigZag MATRIX with REFLECTED format. We have only input x. We have to create a matrix in the following pattern. input n=5...

대략 5년 전

문제를 풀었습니다


Calendar Matrix
Return a calendar matrix for the given values of month and year. Assume that Sunday is the first day of the week. The resulting ...

5년 초과 전

문제를 풀었습니다


Back to basics 20 - singleton dimensions
Covering some basic topics I haven't seen elsewhere on Cody. Remove the singleton dimensions from the input variable (e.g. if...

거의 7년 전

문제를 풀었습니다


Sorting
Assume that x is an n-by-2 matrix. The aim is to return the first column of x, but sorted according to the second column. Exa...

거의 7년 전

문제를 풀었습니다


Matrix Construction I
Given n, construct a matrix as shown in the example below. Example For n=8, the output should look like this: 1 2 3 4 ...

거의 7년 전

문제를 풀었습니다


How to calculate log?
There is a log that have base 5. How to calculate? log5(x)?

거의 7년 전

문제를 풀었습니다


Find remainder when x is divided by 3
Find remainder when x is divided by 3

거의 7년 전

문제를 풀었습니다


Test if a number is numeric or not
Test if a number is numeric or not

거의 7년 전

문제를 풀었습니다


Rotate array 90 degrees
Rotate the given matrix by 90 degrees. Example, A = [1 2 3 ; 4 5 6 ] B = rotated(A) = [ 3 6; 2 5; 1 4 ]

거의 7년 전

문제를 풀었습니다


Change matrix to vector
Vector is a matrix whose size is 1 x n or n x 1. Change matrix to vector. x = 4 3 5 1 ...

거의 7년 전

문제를 풀었습니다


Create a matrix with difference of each row of input matrix
With a given input matrix A, create a output matrix B in such a way that each row in B is a difference of rows of input matrix A...

거의 7년 전

문제를 풀었습니다


Percentage profit:3
x% product is sold at r1% profit. However, our target overall profit is rt%. What is the required percentage profit to meet the ...

대략 7년 전

문제를 풀었습니다


Set x value to each odd index of vector y.
Set x value to each odd index of vector y.

7년 초과 전

문제를 풀었습니다


0, 2, 0, -2, 0, 2, 0, -2, ...
Generate the first n terms of a periodic sequence defined as f(x) = 0, 2, 0, -2, 0, 2, 0, -2, ..., for x = 1, 2, 3, 4, 5, 6...

7년 초과 전

문제를 풀었습니다


expand intervals vol.2
Similar to problem <http://www.mathworks.co.uk/matlabcentral/cody/problems/2528 2528>. This is a more general case, when bounds ...

7년 초과 전

문제를 풀었습니다


Convert a numerical matrix into a cell array of strings
Given a numerical matrix, output a *cell array of string*. For example: if input = 1:3 output is {'1','2','3'} whic...

7년 초과 전

문제를 풀었습니다


Find Missing Number
A little problem (inspired by CodeChef) for the coffee break. A friend give you an array of size n-1 integers and these int...

7년 초과 전

문제를 풀었습니다


Odd elimination
Inspired by Project Euler problem #539 You'll be given a vector from 1 to n; Going from left to right, remove the first n...

7년 초과 전

문제를 풀었습니다


count any radix?
given radix r(2-9), digts d(1-4), give all possible strings in sorted order. for example, if r=2, d=2, then output {'00' '01' '1...

7년 초과 전

문제를 풀었습니다


DC-DC boost converter
Find the output voltage of a DC-DC boost converter when its input voltage is 12V and the duty cycle ratio is 0.6.

7년 초과 전

더 보기