문제를 풀었습니다


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일 전

문제를 풀었습니다


Set some matrix elements to zero
First get the maximum of each *row*, and afterwards set all the other elements to zero. For example, this matrix: 1 2 3 ...

6일 전

문제를 풀었습니다


Find Logic 15

6일 전

문제를 풀었습니다


First non-zero element in each column
For a given matrix, calculate the index of the first non-zero element in each column. Assuming a column with all elements zero i...

6일 전

문제를 풀었습니다


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

6일 전

문제를 풀었습니다


Matlab Basics II - squares
Write a function that takes matrix A, and squares each element in the matrix example: A = [1 2 3] output = [1 4 9]

6일 전

문제를 풀었습니다


Y=X
Given an input variable x, output a variable y that is equal in value to x. Example: Input x = 1 Output y is 1 Inp...

6일 전

문제를 풀었습니다


Remove the two elements next to NaN value
The aim is to *remove the two elements next to NaN values* inside a vector. For example: x = [6 10 5 8 9 NaN 23 9 7 3 21 ...

6일 전

문제를 풀었습니다


Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

7일 전

문제를 풀었습니다


Convert given decimal number to binary number.
Convert given decimal number to binary number. Example x=10, then answer must be 1010.

7일 전

문제를 풀었습니다


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

7일 전

문제를 풀었습니다


Convert radians to degrees
Given input in radians, output to degrees

7일 전

문제를 풀었습니다


Beginner's Problem - Squaring
Try out this test problem first. Given the variable x as your input, square it by two and put the result in y. Examples: ...

7일 전

문제를 풀었습니다


All your base are belong to us
Find the base _b_ logarithm of the input decimal number _x_. Express the output as a decimal number. The first argument is the n...

7일 전

문제를 풀었습니다


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

7일 전

문제를 풀었습니다


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Input...

7일 전

문제를 풀었습니다


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

7일 전

문제를 풀었습니다


Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Example...

7일 전

문제를 풀었습니다


Is my wife right?
Regardless of input, output the string 'yes'.

7일 전

문제를 풀었습니다


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

7일 전

문제를 풀었습니다


Pizza!
Given a circular pizza with radius z and thickness a, return the pizza's volume. [ z is first input argument.] Non-scored bonus...

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일 전

문제를 풀었습니다


Calculate the area of a triangle between three points
Calculate the area of a triangle between three points: P1(X1,Y1) P2(X2,Y2) P3(X3,Y3) these three points are the vertices of ...

8일 전

문제를 풀었습니다


Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

8일 전

문제를 풀었습니다


De-dupe
Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...

8일 전

문제를 풀었습니다


Energy Conversion 1

8일 전

문제를 풀었습니다


Temperature Conversion 3
Given a temperature in Celcius, convert it to Fahrenheit.

9일 전

문제를 풀었습니다


Temperature Conversion 2

9일 전

문제를 풀었습니다


Temperature Conversion 1

9일 전

문제를 풀었습니다


Total energy

9일 전

더 보기