문제를 풀었습니다


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

4년 초과 전

문제를 풀었습니다


Number of Horns on a unicorn!
Calculate the number of horns on a *unicorn*! And I'm talking about a unicorn with not more than one horn on it!

4년 초과 전

문제를 풀었습니다


Circumscribed circles
Given the lengths of the 3 sides of a triangle, output the radius of the circumscribed circle. Example: [3 4 5] -> 2.5

4년 초과 전

문제를 풀었습니다


Flipping
Write code that can reverse the vector without using any sort of loop. Example Given the input vector A = [ 1 2 3 4 5...

4년 초과 전

문제를 풀었습니다


Create a Matrix of Zeros
Given an input x, create a square matrix y of zeros with x rows and x columns.

4년 초과 전

문제를 풀었습니다


Distance walked 2D
Suppose you go from x-y coordinates [3,4] to [0,0] to [0,1] to [1,1], then you walked 7 units of distance.

4년 초과 전

문제를 풀었습니다


give nth decimal place of pi
max 15th place after the decimal point is ok for now

4년 초과 전

문제를 풀었습니다


How many jokers?
* Given DNA codes of a group of suspects, * and a code for certain types of jokers, * Count how many jokers of that type. * ...

4년 초과 전

문제를 풀었습니다


Array of Ones
Create a 100 X 100 array of ones.

4년 초과 전

문제를 풀었습니다


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년 초과 전

문제를 풀었습니다


pressure to dB?
given x ratio of pressure, find corresponding y dB

4년 초과 전

문제를 풀었습니다


Divide by 4
Given the variable x as your input, divide it by four and put the result in y.

4년 초과 전

문제를 풀었습니다


Find the logic
There exists one logic in between input and output. Find it (easy math). Example 1: x=13 then y=339; Example 2: x=26...

4년 초과 전

문제를 풀었습니다


easy problem
Find the last element of the array

4년 초과 전

문제를 풀었습니다


Matlab Basics - Convert a row vector to a column vector
Write a script to convert a row (e.g. x = [1 2 3]) to a column (e.g. y = [1;2;3]), your script should be able to do this for any...

4년 초과 전

문제를 풀었습니다


the average value of the elements
Calculate the average value of the elements in the array

4년 초과 전

문제를 풀었습니다


calculate the length of matrix
input 1 array, calculate the length

4년 초과 전

문제를 풀었습니다


Calculate the square root of a number
Input a Output b = srt(a)

4년 초과 전

문제를 풀었습니다


Back to basics 22 - Rotate a matrix
Covering some basic topics I haven't seen elsewhere on Cody. Rotate the input matrix 90 degrees counterclockwise (e.g. [1 2; ...

4년 초과 전

문제를 풀었습니다


The sum of the numbers in the vector
eg. [1,2,3]---->SUM=6

4년 초과 전

문제를 풀었습니다


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

4년 초과 전

문제를 풀었습니다


Reverse the elements of an array
Reverse the order of elements in an array: eg: input X = [ 1 2 3 ; 4 5 6 ; 7 8 9 ] o...

4년 초과 전

문제를 풀었습니다


Who knows the last digit of pi?
There is only one man who knows the last digit of pi, who is that man? Give the name of that man, who, by popular believe, can ...

4년 초과 전

문제를 풀었습니다


Element by element multiplication of two vectors
Given two input vectors, return the element-by-element product. Example A = [1 2 3] B = [7 3 1] The answer should be...

4년 초과 전

문제를 풀었습니다


The Hitchhiker's Guide to MATLAB
Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".

4년 초과 전

문제를 풀었습니다


Calculate BMI
Given a matrix |hw| (height and weight) with two columns, calculate BMI using these formulas: * 1 kilogram = 2.2 pounds * 1 ...

4년 초과 전

문제를 풀었습니다


Calculate Amount of Cake Frosting
Given two input variables |r| and |h|, which stand for the radius and height of a cake, calculate the surface area of the cake y...

4년 초과 전

문제를 풀었습니다


Find the Best Hotels
Given three input variables: * |hotels| - a list of hotel names * |ratings| - their ratings in a city * |cutoff| - the rat...

4년 초과 전

문제를 풀었습니다


Back to basics 6 - Column Vector
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector, output true or false whether it is a colu...

4년 초과 전

더 보기