문제를 풀었습니다


Back to basics 18 - justification
Covering some basic topics I haven't seen elsewhere on Cody. Given a string with extra spaces in front and/or in back, return...

5년 초과 전

문제를 풀었습니다


Summation of array
Given an array, Find the sum of all of the elements in it Examples: Input x = [1 2 3 5; 4 5 6 7]; Output y is 33

5년 초과 전

문제를 풀었습니다


Duplicate a character
Duplicate a character 'n' times. Example 1: str='a' n=5 output='aaaaa' Example 2: str='*' n=3 output='***'

5년 초과 전

문제를 풀었습니다


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

5년 초과 전

문제를 풀었습니다


Area of rhombus
Calculate the rhombus area

5년 초과 전

문제를 풀었습니다


Project Euler: Problem 5, Smallest multiple
2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smalle...

5년 초과 전

문제를 풀었습니다


Sum of adjacent elements in a vector
Given a vector v, return a vector s containting the sum of every two adjacent elements in the vector. Every element s(i) cont...

5년 초과 전

문제를 풀었습니다


Derivative of polynomial
Compute the derivative of a given polynomial. The input is an <http://www.mathworks.com/help/matlab/math/representing-polynomial...

5년 초과 전

문제를 풀었습니다


Cumulative product of a vector
Cumulative product of a vector example x=[1 2 5 10], then answer must be [ 1 2 10 100] *If you like this prob...

5년 초과 전

문제를 풀었습니다


square root
Find the square root (y) of an input (x).

5년 초과 전

문제를 풀었습니다


BASICS - sum part of vector
Please make a function, where as input you get vector "x" and and vector "c", where in "c" vector you get indexes to sum. Examp...

5년 초과 전

문제를 풀었습니다


High school cafeteria
Given an input vector of positive integers, return a row vector with the primes first (in increasing order) and the composites n...

5년 초과 전

문제를 풀었습니다


Matlab Basics II - Count rows in a matrix
Write a function that returns that number of rows in a vector or matrix x example: x = [1; 2; 3] output = 3

5년 초과 전

문제를 풀었습니다


Find the area of a triangle
Given a triangle with a base b and height h, return the triangle area.

5년 초과 전

문제를 풀었습니다


Solve the set of simultaneous linear equations
Given this pair of simultaneous linear equations: 2x + 3y = 23 3x + 4y = 32 Find the solution set (x,y)

5년 초과 전

문제를 풀었습니다


Compute LOG(1+X) in natural log
Compute LOG(1+X) in natural log

5년 초과 전

문제를 풀었습니다


Find the largest number
Given a vector v with 4 elements, find the largest number x. Example: Input: v = [4 7 1 6]; Output: x = 7; You mu...

5년 초과 전

문제를 풀었습니다


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

5년 초과 전

문제를 풀었습니다


Area of a circle
Given the radius x, y would be the area of a circle. Pi = 3.1416

5년 초과 전

문제를 풀었습니다


Matlab Basics II - Intervals
Write a function that takes an interval from a to b, and divides it into 5 parts example: a = 1, b = 2 output = 1 1.25 ...

5년 초과 전

문제를 풀었습니다


Create incrementing array
Given a and b generate an output matrix as shown in following examples: a=2 b=5 output=[2 20 200 2000 20000] a=4 b...

5년 초과 전

문제를 풀었습니다


Negative Infinity
Round the given array a towards negative infinity.

5년 초과 전

문제를 풀었습니다


Remove the first, third and fifth rows of a matrix
Given a matrix x with at least five rows, return a matrix y that includes all rows of x except for th 1st, the 3rd and 5th. E...

5년 초과 전

문제를 풀었습니다


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

5년 초과 전

문제를 풀었습니다


Is this matrix orthogonal?
Given a square matrix, a, determine whether it is orthogonal. INPUT: a, a n x n matrix OUTPUT: true or false

5년 초과 전

문제를 풀었습니다


Do Fast Fourier Transformation
Example Fast Fourier Transformation from vector [2,1]) ans = 3 1

5년 초과 전

문제를 풀었습니다


Replacing a row
For matrix G=[1 2 3; 4 5 6; 7 8 9] Replace the 2nd row with 8s **remember to create matrix G

5년 초과 전

문제를 풀었습니다


MATLAB Basic: rounding IV
Do rounding towards plus infinity. Example: -8.8, answer -8 +8.1 answer 9 +8.50 answer 9

5년 초과 전

문제를 풀었습니다


Switch matrix to a column vector
for e.g. x = [1 2 3 4] y = 1 3 2 4

5년 초과 전

문제를 풀었습니다


Finding perimeter of a rectangle
A rectangle has a length of x centimeters and a width of w centimeters. Find the perimeter.

5년 초과 전

더 보기