문제를 풀었습니다


Return a list sorted by number of consecutive occurrences
Inspired by Problem 38 by Cody Team. Given a vector x, return a vector y of the values in x sorted by the number of CONSECUTIVE ...

2개월 전

문제를 풀었습니다


Construct an index vector from two input vectors in vectorized fashion
Create an index vector defined by two input vectors, one defining the beginnings of one or more index ranges, and the other defi...

2개월 전

문제를 풀었습니다


03 - Matrix Variables 3
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3c.png>> A 10x10 matrix where the numbers from 1 to 100 ...

2개월 전

문제를 풀었습니다


Parallel vectors
Return true or false depending on whether 2 vectors are parallel or not. Vectors can be 2 or 3 dimensional. The origin is not c...

2개월 전

문제를 풀었습니다


Cancel Middle
Write a function called cancel_middle that takes A, an n-by-m matrix, as an input where both n and m are odd numbers an...

2개월 전

문제를 풀었습니다


ASCII Birthday Cake
Given an age and a name, give draw an ASCII birthday cake. For example, given the name "CODY" and the age 5, return a string wit...

2개월 전

문제를 풀었습니다


5 Prime Numbers
Your function will be given lower and upper integer bounds. Your task is to return a vector containing the first five prime numb...

2개월 전

문제를 풀었습니다


Ripping numbers apart!
So you have to "rip" a number apart into individual digits... The end output is a cell. That is if: x = 12345678 o...

2개월 전

문제를 풀었습니다


String substitution, sub problem to cryptoMath
This is a sub problem related to this problem: <http://www.mathworks.com/matlabcentral/cody/problems/621-cryptomath-addition>...

2개월 전

문제를 풀었습니다


Add more zeros
Find code that adds one 0 to each sequence of 0 in a string (composed with only 0 or 1). For example: '1010' -> '100100' ...

2개월 전

문제를 풀었습니다


Combinations without using nchoosek
You have to generate a matrix with all possible combinations of n elements *taken 2* at a time, *without using nchoosek(1:n,2)* ...

2개월 전

문제를 풀었습니다


Make a logical diamond using GALLERY function
Inspired from <http://www.mathworks.com/matlabcentral/cody/problems/1078-make-a-diamond Problem 1078. Make a diamond> In thi...

2개월 전

문제를 풀었습니다


Get the elements of diagonal and antidiagonal for any m-by-n matrix
In the problem <http://www.mathworks.com/matlabcentral/cody/problems/858-permute-diagonal-and-antidiagonal Problem 858. Permute ...

2개월 전

문제를 풀었습니다


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

2개월 전

문제를 풀었습니다


How unique?
Sometimes, when we check unique entries of vector we would like to know how many times each value occurs. Given vector of num...

2개월 전

문제를 풀었습니다


Would Homer Like It?
Given a matrix of ones and zeros, you must determine if there are any doughnuts present (would Homer Simpson like it?). A doug...

2개월 전

문제를 풀었습니다


Prime Ladders
A <http://en.wikipedia.org/wiki/Word_ladder word ladder> transforms one word to another by means of single-letter mutations. So ...

2개월 전

문제를 풀었습니다


Is It a Snake?
Given an m-by-n matrix, return true if the elements of the matrix are a connected "snake" shape from 1 to m*n. Otherwise return ...

2개월 전

문제를 풀었습니다


Solve for factorial of X
It gives you the number x, and set y equal to x factorial. Ex. There are 52 cards in a deck, each specific order of all 52 car...

2개월 전

문제를 풀었습니다


Find a subset that divides the vector into equal halves
Given a vector x, return the indices to elements that will sum to exactly half of the sum of all elements. Example: Inpu...

2개월 전

문제를 풀었습니다


How many trades represent all the profit?
Given a list of results from trades made: [1 3 -4 2 -1 2 3] We can add them up to see this series of trades made a profit ...

2개월 전

문제를 풀었습니다


Spot the outlier
All points except for one lie on a line. Which one is the outlier? Example: You are given a list of x-y pairs in a column ...

2개월 전

문제를 풀었습니다


Solitaire Cipher
Implement the <http://en.wikipedia.org/wiki/Solitaire_(cipher) solitaire cipher>. Since this is from Wikipedia, I am capturin...

2개월 전

문제를 풀었습니다


How long is the longest prime diagonal?
Stanislaw Ulam once observed that if the counting numbers are arranged in a spiral, the prime numbers contained in it form a sur...

2개월 전

문제를 풀었습니다


Find the biggest empty box
You are given a matrix that contains only ones and zeros. Think of the ones as columns in an otherwise empty floor plan. You wan...

2개월 전

문제를 풀었습니다


Double Fibonacci
double_fibonacci takes two integers, each greater than one, as input arguments (it does not have to check the format of the inpu...

2개월 전

문제를 풀었습니다


Reverse the input
Given an input (n), produce an output in the reverse order with out using string variables or string function. Example x ...

2개월 전

문제를 풀었습니다


Sort in descending order.

2개월 전

문제를 풀었습니다


Summation of integers

2개월 전

문제를 풀었습니다


Largest Twin Primes
<http://en.wikipedia.org/wiki/Twin_prime Twin primes> are primes p1, p2 = p1 + 2 such that both p1 and p2 are prime numbers. Giv...

2개월 전

더 보기