문제를 풀었습니다


Ratio between sum of primes and sum of factors
Write a function that calculates the ratio between the sum of primes numbers lower or equal to x, and the sum of the factors of ...

3개월 전

문제를 풀었습니다


Ratio between sums of prime and non-prime numbers
Write a function that calculates the ratio between the sum of the prime numbers lower or equal than x, and the sum of the non-pr...

3개월 전

문제를 풀었습니다


Sum of a geometric series
Give the sum of the first 'n' terms of a geometric series, given 'a' as the first term and 'r' as the ratio.

3개월 전

문제를 풀었습니다


Get the value 100
Knowing that 123-45-67+89=100, write a function that gives this result for any order of the digits in the input. Otherwise, the ...

3개월 전

문제를 풀었습니다


Get the mean digit
Write a function that gives the mean digit (round towards nearest integer) of an input and positive number. For example: x ...

3개월 전

문제를 풀었습니다


Check if is a square
Given four coordinates, write a function to check if they form a square on the XY plane.

3개월 전

문제를 풀었습니다


Alternating 1´s and 0´s in a matrix
Given an odd number n, write a function that creates a matrix y with dimension nxn alternating 1's and 0's, and starting with 1 ...

3개월 전

문제를 풀었습니다


Mean number of letters per word (Easy)
Given a character array, s, representing a sentence, return a, the arithmetic mean of the number of letters per word in the give...

3개월 전

문제를 풀었습니다


X O X Oh!
_This follows on from problem 44850 - X O X O_ <https://www.mathworks.com/matlabcentral/cody/problems/44850-x-o-x-o> On a...

3개월 전

문제를 풀었습니다


X O X O
On a noughts and crosses board, how many possible unique combinations are there given a square grid of length n? Assumptions/...

3개월 전

문제를 풀었습니다


Given a base n, find the y values less or equal than 100(without 1), such that they will never produce a periodic number if we divide any whole number between some of them
A periodic number depends on the base b where we are working. So, for example the number 2/3 in decimal base is periodic(0.666...

3개월 전

문제를 풀었습니다


Approximate the inverse tangent by power series
Given values b (where abs(b)<=1) and n (polynomial order), write a function that calculates atan(b) by using power series.

3개월 전

문제를 풀었습니다


Say type of roots in quadratic equation
Given the coefficients of a quadratic equation, write a function that gives the output y='RealDifferent' if the roots are real a...

3개월 전

문제를 풀었습니다


Just another norm problem (JANP)
*Task:* Implement a function that takes a square matrix A and returns a nonzero vector yc which minimizes ...

3개월 전

문제를 풀었습니다


Just another sum (JAS)
*Task:* Write a function that takes a vector X and returns the alternating sum of X: X(1)-X(2)+X(3)-X(4)+... *Example...

3개월 전

문제를 풀었습니다


Moving average
A moving average function that returns an array that is equal in length to the input arrays (which can be row or column) A va...

3개월 전

문제를 풀었습니다


Nth Order Polynomial Regression
Inputs: -two vectors x and y (row or column) -order of polynomial, p Outputs: -vector of coefficients [b0 b...

3개월 전

문제를 풀었습니다


Double the next!
Given two numbers, m and n, find a matrix [m,n] where each element value is twice the value of the previous element. Starting fr...

3개월 전

문제를 풀었습니다


Cody problems in French : Trouvez la logique Pt.2
Trouvez la logique entre x et y, aidez-vous de la test suite. Bon courage. P.S: L'utilisation de "^" est de nouveau fortement...

3개월 전

문제를 풀었습니다


Cody Problems in French : Trouvez la logique Pt.1
On rentre x = 4 et il en sort y = 160. Trouvez la logique entre x et y, aidez-vous de la test suite. Bon courage. P.S: L'...

3개월 전

문제를 풀었습니다


Homogeneous lines and points in 2D: problem 1
In high school we learn the line equation y = mx + c where m is the gradient and c is the intercept. However this form is proble...

3개월 전

문제를 풀었습니다


Calculate the square of a number (Super Easy)
The goal is to calculate the square (y) of a number (x). Good way to start MatLab for beginners.

3개월 전

문제를 풀었습니다


Generate Convolution Matrix of 2D Kernel with Different Convolution Shapes (Full, Same, Valid)
In this problem the challenge is to build the Matrix Form equivalent of the function `conv2()` of MATLAB. The function to be ...

3개월 전

문제를 풀었습니다


Word Distance - Average Sort
Based on the method of <https://www.mathworks.com/matlabcentral/cody/problems/44815-word-distance-sum this problem>, write a fun...

3개월 전

문제를 풀었습니다


Add consecutive integer numbers
Given consecutive numbers, add the numbers *without using the sum command in MATLAB.*

3개월 전

문제를 풀었습니다


Wrecked Angles?
It's time for some simple geometry fun to start off the new year. You will be given the perimeter P and the area A of a recta...

3개월 전

문제를 풀었습니다


Find the complement of a number in binary
Input x is a decimal number and output y is the complement of binary representation of x. For example, x = 10 has the binary ...

3개월 전

문제를 풀었습니다


Optimization of cylinder surface area
Optimization of a cylinder surface area. What are the best parameters (radius and height) to get the minimum cylinder surface a...

3개월 전

문제를 풀었습니다


Draw Dominos
Write a function to draw dominos. The number on each side can range from 0 to 9. For example, for an input of [3,7], your functi...

3개월 전

문제를 풀었습니다


Cube root of max value in a vector
Find the cube root of the maximum value in a vector

3개월 전

더 보기