문제를 풀었습니다


"mirror" matrix
Create n x 2n "mirror" matrix of this type: e.g. for n = 2 m = [1 2 2 1;1 2 2 1] e.g. for n = 3 m = [1 2 3 3 2 1...

거의 9년 전

문제를 풀었습니다


Geometric series
Find the sum, given the first term t1, the common ratio r, and number of terms n. Examples If input t1=1, r=1, n=7 the...

거의 9년 전

문제를 풀었습니다


Sum of series III
What is the sum of the following sequence: Σ(2k-1)^3 for k=1...n for different n?

거의 9년 전

문제를 풀었습니다


Sum of series I
What is the sum of the following sequence: Σ(2k-1) for k=1...n for different n?

거의 9년 전

문제를 풀었습니다


Back to basics - mean of corner elements of a matrix
Calculate the mean of corner elements of a matrix. e.g. a=[1 2 3; 4 5 6; 7 8 9;] Mean = (1+3+7+9)/4 = 5

거의 9년 전

문제를 풀었습니다


Divide the Least Common Multiple by the Greatest Common Divisor of two numbers
Divide the Least Common Multiple by the Greatest Common Divisor of two numbers. For example, for x=12345 and y=54321, the answer...

거의 9년 전

문제를 풀었습니다


Divisible by 10
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

거의 9년 전

문제를 풀었습니다


Dice roll - lateral faces
For this problem, you will be provided with the values of a dice roll (regular six-sided dice). The number of dice will be at le...

거의 9년 전

문제를 풀었습니다


Dice roll - opposite faces
For this problem, you will be provided with the values of a dice roll (regular six-sided dice). The number of dice will be at le...

거의 9년 전

문제를 풀었습니다


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

거의 9년 전

문제를 풀었습니다


Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
If _p_ is the perimeter of a right angle triangle with integral length sides, { _a_, _b_, _c_ }, there are exactly three solutio...

거의 9년 전

문제를 풀었습니다


Project Euler: Problem 9, Pythagorean numbers
A Pythagorean triplet is a set of three natural numbers, a b c, for which, a^2 + b^2 = c^2 For example, 3^2 + 4^2 =...

거의 9년 전

문제를 풀었습니다


letter yes yes & letter no no
Split a string into two strings, wherein the first string has all alphabetic letters and the second string has all the remaining...

거의 9년 전

문제를 풀었습니다


Create Volcano (or Atoll) martix. It is an extension of Bullseye matrix problem.
For example, if n=2 (maximum value), the output matrix should be [1 1 1 1 1; 1 2 2 2 1; 1 2 1 2 1; 1 2 2 2 1; 1...

대략 9년 전

문제를 풀었습니다


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

대략 9년 전

문제를 풀었습니다


Mirror Image matrix across anti-diagonal
Given an input number x, create a Mirror Image matrix 'Y' across anti-diagonal in following way:- Example:- If x=3, Y= [1 ...

대략 9년 전

문제를 풀었습니다


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

대략 9년 전

문제를 풀었습니다


matrix of natural number
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 resides seially as shown in the examples below. ...

대략 9년 전

문제를 풀었습니다


Create an 'arrow-head" matrix
Write a function that when given an odd number, produces an arrow-head function pointing to the right. Examples n = 3 ...

대략 9년 전

문제를 풀었습니다


BULLSEYE Part 2: Reference Problem 18 BULLSEYE
Given n (always odd), return output a that has concentric rings of the 1s and 0s around the center point. Examples: Input ...

대략 9년 전

문제를 풀었습니다


BULLSEYE Part 3: Reference Problem 18 BULLSEYE
Given n (always odd), return output a that has concentric rings of the 69s and 0s around the center point. Examples: Input ...

대략 9년 전

문제를 풀었습니다


Ring Matrix
Given n (only odd), return output matrix a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. ...

대략 9년 전

문제를 풀었습니다


Number of odd and even elements within matrix
Input(m) - any matrix with integers Output(n) - n(1)=number of odd elements, n(2)=number of even elements Example: * m=...

대략 9년 전

문제를 풀었습니다


Create incremental spiral WITHOUT USING EVAL or FEVAL
Constructions that use feval or eval are used to cheat with cody. This test-suite tries to avoid that trick. The goal of this...

대략 9년 전

문제를 풀었습니다


Spiral Matrix
for a given integer n>=3, generate a matrix of nxn such that the value n^2 is at bottom left and its decreasing towards center ...

대략 9년 전

문제를 풀었습니다


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

대략 9년 전

문제를 풀었습니다


make an eye matrix which element is 1:n
for a given input n, make an n by n matrix which contains elements 1:n for example input =5 output = [1 0 0 0 0;0 2 0 0 0; 0...

대략 9년 전

문제를 풀었습니다


Tridiagonal
Return an n-by-n matrix that has a, b, c as the subdiagonal, main diagonal, and superdiagonal entries in the matrix. Example ...

대략 9년 전

문제를 풀었습니다


Calculate the centroid of a triangle
Info: https://en.wikipedia.org/wiki/Centroid Example Input: x = [0 0 1]; % x-coordinate y = [0 1 0]; % y-coordinat...

대략 9년 전

문제를 풀었습니다


Average valid values of arrays
Given a 1D array (column or row vector), compute the average of valid values. Valid values are defined via two thresholds: minVa...

대략 9년 전

더 보기