문제를 풀었습니다


Matrix indexing with two vectors of indices
Given a matrix M and two index vectors a and b, return a row vector x where x(i) = M(a(i),b(i)).

14년 초과 전

문제를 풀었습니다


"Look and say" sequence
What's the next number in this sequence? * [0] * [1 0] * [1 1 1 0] * [3 1 1 0] * [1 3 2 1 1 0] This a variant on the w...

14년 초과 전

문제를 풀었습니다


middleAsColumn: Return all but first and last element as a column vector
Given input A, return all but the first and last elements, arranged as a column vector. (I.e., all dimensions after the first s...

14년 초과 전

문제


Repopulate the City
For any population p of positive integers between pmin and pmax, we can calculate histogram count n for a list of evenly dividin...

14년 초과 전 | 13 | 솔버 수: 53

문제를 풀었습니다


Return elements unique to either input
Given two numeric inputs a and b, return a row vector that contains the numbers found in only a or only b, but not both. For ex...

14년 초과 전

문제


Encoding Google Maps Polylines
This problem is based on the Google Polyline Encoder algorithm. This is how Google Maps encodes a line for display on a map. You...

14년 초과 전 | 1 | 솔버 수: 15

문제를 풀었습니다


Number of 1s in a binary string
Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...

14년 초과 전

문제를 풀었습니다


How to add?
* Imagine you are in 2222 Anno Domini, when everyone must learn how to add, * and competing for the highly prestigious post of,...

14년 초과 전

문제를 풀었습니다


Flip the main diagonal of a matrix
Given a n x n matrix, M, flip its main diagonal. Example: >> M=magic(5); >> flipDiagonal(M) 9 24 1 ...

14년 초과 전

문제를 풀었습니다


Set defaults
Write a function that computes the volume of a cube. The function should be able to accept three inputs: the length, width, and...

14년 초과 전

문제


Stuff the Board
You have a stack of tiles to put onto an array-like playing board. Each tile has a number (always an integer), and the board var...

14년 초과 전 | 9 | 솔버 수: 587

문제


Rotate and display numbered tile
Imagine a square tile with four numbers on it, one on each edge. We will call these edges north, east, south, and west. If th...

14년 초과 전 | 4 | 솔버 수: 385

문제를 풀었습니다


Stuff the Board
You have a stack of tiles to put onto an array-like playing board. Each tile has a number (always an integer), and the board var...

14년 초과 전

문제를 풀었습니다


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

14년 초과 전

문제를 풀었습니다


Vectorizing, too easy or too hard?
Please insert a . before any ^, * or / in the string. That's it!!

14년 초과 전

문제


Convert hex color specification to MATLAB RGB
Here's something that comes up all the time if you deal with web pages. Given a <http://www.w3schools.com/html/html_colors.as...

14년 초과 전 | 7 | 솔버 수: 260

문제를 풀었습니다


Cody Computer Part 1 - Guess the system font used by uipanel
list = listfonts return the list of available system fonts. Can you guess which font is used for uipanel on the CODY computer...

14년 초과 전

문제


Spot the rectangle (Part 2)
This problem is related to the <http://bit-player.org/2009/the-17x17-challenge 17x17 challenge>. See also <http://www.mathworks....

14년 초과 전 | 5 | 솔버 수: 142

문제


Spot the rectangle
This problem is related to the <http://bit-player.org/2009/the-17x17-challenge 17x17 challenge>. Given a matrix filled with ones...

14년 초과 전 | 3 | 솔버 수: 180

문제


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

14년 초과 전 | 5 | 솔버 수: 22

문제를 풀었습니다


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

14년 초과 전

문제를 풀었습니다


Make an awesome ramp for a tiny motorcycle stuntman
Okay, given a vector, say v=[1 3 6 9 11], turn it into a matrix 'ramp' like so: m=[1 3 6 9 11; 3 6 9 11 0; 6 9 ...

14년 초과 전

문제


Formatting currency numbers
Given a number, format it properly for textual display using the notation $xxx,xxx,xxx.xx. Assume that no more than two digits ...

14년 초과 전 | 0 | 솔버 수: 206

답변 있음
Function to format number as currency?
Using SPRINTF is the way to go, but getting the commas right is tricky. I turned this into a question for Cody to see what folks...

14년 초과 전 | 1

문제를 풀었습니다


Formatting currency numbers
Given a number, format it properly for textual display using the notation $xxx,xxx,xxx.xx. Assume that no more than two digits ...

14년 초과 전

문제


Is this group simply connected?
Given connectivity information about a graph, your job is to figure out if the graph is fully connected. You are given a list of...

14년 초과 전 | 6 | 솔버 수: 38

문제를 풀었습니다


Right and wrong
Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...

14년 초과 전

답변 있음
How to separate this DNA sequence?
Here's a simple way to chunk your DNA up into codons. Then you can just pull the rows off to get each triplet. >> sequence =...

14년 초과 전 | 2

| 수락됨

문제를 풀었습니다


Add two numbers
Given a and b, return the sum a+b in c.

14년 초과 전

문제


Find the stride of the longest skip sequence
We define a _skip sequence_ as a regularly-spaced list of integers such as might be generated by MATLAB's <http://www.mathworks....

14년 초과 전 | 11 | 솔버 수: 193

더 보기