문제를 풀었습니다


Find longest run
Write a function longest_run that takes as input an array of 0's and 1's and outputs the length and index of the longest consecu...

13일 전

문제를 풀었습니다


Sorting integers by their digits (Level 2)
This is the next step up from <http://www.mathworks.com/matlabcentral/cody/problems/42809-sorting-integers-by-their-digits Probl...

13일 전

문제를 풀었습니다


Sorting integers by their digits (Level 1)
Given a vector, v, of positive integers, return a vector, w, by sorting v in ascending order, such that primary sorting is done ...

13일 전

문제를 풀었습니다


Weave two matrices together to form one matrix
Take the first column from matrix a, then insert the first column from matrix b, and so on. For example: a = [1 2 3 4]; b ...

13일 전

문제를 풀었습니다


Check if a rotated array was originally sorted
Suppose a sorted array is rotated at some pivot unknown to you. For example, |[0 1 2 4 5 6 7]| might become |[5 6 7 0 1 2 4]|. ...

13일 전

문제를 풀었습니다


S-T-R-E-T-C-H I-T O-U-T
You will be given a row of numbers (x), and a single number (n). Your job is to write a script that will stretch out the row of...

13일 전

문제를 풀었습니다


Look Up Mapping
Let the input is A = {[] [] [] [1] []}; B = {'A','B','C','D','E'}; Mapped Output = 'D';

13일 전

문제를 풀었습니다


generate number in particular way
A = [1 5 2 7]; MAX = 10; generate a array Y = [1 2 2 2 2 2 3 3 4 4]; i.e. total eleme...

13일 전

문제를 풀었습니다


Legend of Zelda - Rupee Count (Item Purchase)
Building off of <https://www.mathworks.com/matlabcentral/cody/problems/3025-zelda-rupee-count Problem 3025>, suppose that an arr...

13일 전

문제를 풀었습니다


Eliminate unnecessary polygon vertices
Suppose you have an n-point polygon represented as an n-by-2 matrix of polygon vertices, P. Assume that the polygon is closed; t...

13일 전

문제를 풀었습니다


Make a "better" checkerboard matrix
This problem seeks to expand the task in Cody Problem 4 by allowing for the creation of checkerboard matrices that can be rectan...

13일 전

문제를 풀었습니다


Create 24-bit image containing all possible colors
A 24-bit image is an image where each pixel is represented by three values, which are the red, green, and blue color components,...

13일 전

문제를 풀었습니다


İmage Series 2 AND
Given two input first one is a number which is uint8, second one is image which is 8 bit gray scale image, the image has pixsels...

13일 전

문제를 풀었습니다


Lambert's W
Matlab cody does not support lambertw. Try to create a lambert's w function yourself. Lambert's W is the function that solves...

13일 전

문제를 풀었습니다


Remove white spaces at the end of the input string
Remove all trailing white spaces at the end of the input strings

13일 전

문제를 풀었습니다


Area-03
There are two circles of equal size are inscribed inside a square. They are tangent to each other. <https://serving.photos.ph...

13일 전

문제를 풀었습니다


Encode Me From The Past
Given this input x = 2, 5, 1, 2, 4, 1, 1, 3 output should be (Five 2's, Two 1's, One 4, Three 1's) [2 2 2 2 2 1 1 4 1...

13일 전

문제를 풀었습니다


Identify Ruth-Aaron numbers
After Hank Aaron hit his 715th home run and passed Babe Ruth’s total of 714, Carl Pomerance noticed that the union of the prime ...

13일 전

문제를 풀었습니다


Find the coefficient of a number in scientifc notation
Given a non-negative real number N, find the coefficient C and the exponent E of its scientific notation (N = C 10^E). Note that...

13일 전

문제를 풀었습니다


Check Euler's characteristic on regular polyhedra
Problem statement Given the number of vertices and the number of faces of a given regular polyhedron, compute the number of its...

13일 전

문제를 풀었습니다


Numbers at bit-boundary
Find if a number is on or below the bit-boundary, as defined below. Examples 7,9 straddle the bit-boundary at 2^3 as do 31,32 ...

13일 전

문제를 풀었습니다


Extract Increasing Integers from Digit String
Given a string containing only digits, the function get_integers should return the list of increasing integers obtained by readi...

13일 전

문제를 풀었습니다


AK Sorting according to given order
Conventional ascending order of one digit number is [ 0, 1, 2, ......9]. Now this order is changed and stored in vector a. For e...

13일 전

문제를 풀었습니다


Identify de Polignac numbers
The numbers 125 and 329 can be written as the sum of a prime and a power of 2. For example, , and . The numbers 127 and 331, whi...

13일 전

문제를 풀었습니다


Parsing Expressions - Binary Arithmetic Operators I
Parse and evaluate expressions like these: '1 + 2' '51 - 78' '42 * 9' The only operators are +, -, *. Both argu...

13일 전

문제를 풀었습니다


Find the number that has most primes those less than it
Given an vector x of integer numbers, find the element of x that has the most primes less than it.

13일 전

문제를 풀었습니다


Probabilities - More brains than luck
This problem is related to <http://it.mathworks.com/matlabcentral/cody/problems/596-more-luck-than-brains Problem 596. More luck...

13일 전

문제를 풀었습니다


Generalised Hamming Number
Inspired by Project Euler n°204 and Problem 1308 by James A generalised Hamming number of type n, has no prime factor larger ...

13일 전

문제를 풀었습니다


Find vampire numbers
A vampire number is a number v that is the product of two numbers x and y such that the following conditions are satisfied: at ...

13일 전

문제를 풀었습니다


Numbers with prime factors 2, 3 and 5.
Make a function which takes one positive integer n and returns a matrix with the numbers of the form (2^i)*(3^j)*(5^k) which are...

13일 전

더 보기