Resuelto


Put two time series onto the same time basis
Use interpolation to align two time series onto the same time vector. This is a problem that comes up in <http://www.mathwork...

más de 14 años hace

Resuelto


Return the first and last character of a string
Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...

más de 14 años hace

Resuelto


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

más de 14 años hace

Resuelto


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

más de 14 años hace

Resuelto


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

más de 14 años hace

Problema


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

más de 14 años hace | 13 | 53 solvers

Resuelto


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

más de 14 años hace

Problema


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

más de 14 años hace | 1 | 15 solvers

Resuelto


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

más de 14 años hace

Resuelto


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

más de 14 años hace

Resuelto


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

más de 14 años hace

Resuelto


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

más de 14 años hace

Problema


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

más de 14 años hace | 9 | 588 solvers

Problema


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

más de 14 años hace | 4 | 386 solvers

Resuelto


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

más de 14 años hace

Resuelto


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

más de 14 años hace

Resuelto


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

más de 14 años hace

Problema


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

más de 14 años hace | 7 | 260 solvers

Resuelto


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

más de 14 años hace

Problema


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

más de 14 años hace | 5 | 144 solvers

Problema


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

más de 14 años hace | 3 | 181 solvers

Problema


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

más de 14 años hace | 5 | 22 solvers

Resuelto


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

más de 14 años hace

Resuelto


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

más de 14 años hace

Problema


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

más de 14 años hace | 0 | 206 solvers

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

más de 14 años hace | 1

Resuelto


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

más de 14 años hace

Problema


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

más de 14 años hace | 6 | 38 solvers

Resuelto


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

más de 14 años hace

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

más de 14 años hace | 2

| aceptada

Cargar más