문제를 풀었습니다


sinus function
x is the abscissa. find the absolute value of cosine of -x and the same value with changed sign.

8년 초과 전

문제를 풀었습니다


Logical operators and arrays: 3-input and truth table
Given 3 inputs (inputA, inputB, inputC), assign threeInputAnd with the truth table outcomes for a 3 variable logical-and operati...

8년 초과 전

문제를 풀었습니다


Compute Fibonacci Number
Compute the _n_-th Fibonacci Number f(0) = 0, f(1) = 1, f(2) = 1, f(3) = 2, ... f(42) = 267914296

8년 초과 전

문제를 풀었습니다


Calculate distance travelled when given radius and rotations
When given radius of wheel and number of rotations calculate total distance travelled consider pi=3.14

8년 초과 전

문제를 풀었습니다


frame of the matrix
Given the matrix M, return M without the external frame.

8년 초과 전

문제를 풀었습니다


Logical operators: Flipping bits
The xor operator will toggle the bit if the bit is xored with 1. Ex: 1 XOR 0 = 1, 1 XOR 1 = 0. The xor operator will retain th...

8년 초과 전

문제를 풀었습니다


Function definition: BMI calculator
Define a function CalculateBMI with inputs massKg and heightCm. The function returns bodyMassIndex. The function should be able ...

8년 초과 전

문제를 풀었습니다


Elapsed time is -0.005204 seconds.
Write a function that takes less than zero seconds to execute, as measured using tic and toc. For repeatability, the test case p...

8년 초과 전

문제를 풀었습니다


Sum of odd numbers in a matrix
Find the sum of all the odd numbers in a matrix. Example x = [2 3 5 7 1 4 11] y = 27

8년 초과 전

문제를 풀었습니다


Bit Reversal
Given an unsigned integer _x_, convert it to binary with _n_ bits, reverse the order of the bits, and convert it back to an inte...

8년 초과 전

문제를 풀었습니다


Negative Infinity
Round the given array a towards negative infinity.

8년 초과 전

문제를 풀었습니다


Matlab Basics - Rounding II
Write a script to round a variable x to 3 decimal places: e.g. x = 2.3456 --> y = 2.346

8년 초과 전

문제를 풀었습니다


Concatenate two strings
Its very easy. Just concatenate two strings.

8년 초과 전

문제를 풀었습니다


Binary
Given a positive, integer n, create a function that returns the respective binary number in the form of a vector. Example: ...

8년 초과 전

문제를 풀었습니다


Count decimal digits of a number
* Given an integer number you have to return the number of its digits. * For example 248 has 3 digits and 1589 has 4 digits ...

8년 초과 전

문제를 풀었습니다


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

8년 초과 전

문제를 풀었습니다


Sum of diagonals elements of a matrix
Given a matrix, return the sum of all the elements across the diagonals. E.g. A = [1 2 3; 4 5 6; 7 8 9;...

8년 초과 전

문제를 풀었습니다


Convert Fahrenheit to Celsius
Calculate the Celsius temperature C given the Fahrenheit temperature F. Examples: Input F = 90 Output C is 32.22 I...

8년 초과 전

문제를 풀었습니다


Returning a "greater than" vector
Given a vector, v, return a new vector , vNew, containing only values > n. For example: v=[1 2 3 4 5 6] n=3 vNew =...

8년 초과 전

문제를 풀었습니다


Calculate the derivative of a polynomial
Example: in = [ 1 1 1 ] out = [ 2 1 ]

8년 초과 전

문제를 풀었습니다


Nth root.
* Assign outValues with the nth root of the inValues, the root is specified by rootValue

8년 초과 전

문제를 풀었습니다


poll: would you like the regexp (?@cmd) functionality to be banned in Cody?
This problem is a poll (and a little bit of "white hat hacktivism" as well) regarding Cody users sentiment about the use of rege...

8년 초과 전

문제를 풀었습니다


Narcissistic number ?
Inspired by Problem 2056 created by Ted. In recreational number theory, a narcissistic number is a number that is the sum of ...

8년 초과 전

문제를 풀었습니다


Logical variables: Running late?
* Assign onTime with true if noTraffic is true and gasEmpty is false.

8년 초과 전

문제를 풀었습니다


reverse string
input='rama' output='amar'

8년 초과 전

문제를 풀었습니다


Add a row of zeros on top of a matrix
Given a matrix, insert a row of zeros as the top row.

8년 초과 전

문제를 풀었습니다


Roots
Find out the roots of a given polynomial equation.Given are the coefficients of the equation.

8년 초과 전

문제를 풀었습니다


Factorial Numbers
Factorial is multiplication of integers. So factorial of 6 is 720 = 1 * 2 * 3 * 4* 5 *6 Thus 6 factorial = factorial(720)....

8년 초과 전

문제를 풀었습니다


Matlab Basics - Absolute Value
Write a script that returns the absolute value of the elements in x e.g. x = [-1 -2 -3 -4] --> y = [1 2 3 4]

8년 초과 전

문제를 풀었습니다


The Dark Side of the Die
It is well-known that opposite sides of a classic hexahedral die add to 7. Given a vector of dice rolls, calculate the sum of th...

8년 초과 전

더 보기