Problem


Bleed non-zeros to the right using REGEXP, and that sort of cheatcodess...
This one is quite similar to <http://www.mathworks.nl/matlabcentral/cody/problems/1998-bleed-non-zeros-to-the-right>. But thi...

mehr als 12 Jahre vor | 0 | 28 Lösungsvorschläge

Problem


Bleed non-zeros to the right
What a title! Yet, it says what I mean. You get a vector, some values and a lot of zeroes. Every zero is replaced by the firs...

mehr als 12 Jahre vor | 2 | 41 Lösungsvorschläge

Gelöst


What is the next step in Conway's Life?
Given a matrix A that represents the state of <http://en.wikipedia.org/wiki/Conway's_Game_of_Life Conway's game of Life> at one ...

mehr als 12 Jahre vor

Gelöst


Who is the smartest MATLAB programmer?
Who is the smartest MATLAB programmer? Examples: Input x = 'Is it Obama?' Output = 'Me!' Input x = 'Who ?' Ou...

mehr als 12 Jahre vor

Gelöst


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

mehr als 12 Jahre vor

Gelöst


Count photos
Given n people, everyone must have pictures taken with everyone, each photo includes only two persons, please count the total nu...

mehr als 12 Jahre vor

Gelöst


Lose control
Remove all characters that are below space in ASCII value.

mehr als 12 Jahre vor

Gelöst


Sorting
Assume that x is an n-by-2 matrix. The aim is to return the first column of x, but sorted according to the second column. Exa...

mehr als 12 Jahre vor

Gelöst


Create a square matrix of multiples
Given an input, N, output a matrix N x N with each row containing multiples of the first element of each row. This also applies...

mehr als 12 Jahre vor

Gelöst


Distance walked 3D
suppose you go from x-y-z coordinates [3,4,2] to [0,0,2] to [0,1,2] to [1,1,2], to [1,1,20] then you walked 25 units of distance...

mehr als 12 Jahre vor

Gelöst


Set the array elements whose value is 13 to 0
Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

mehr als 12 Jahre vor

Gelöst


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

mehr als 12 Jahre vor

Gelöst


Fahrenheit to Celsius using multiple statements
Given a Fahrenheit value F, convert to a Celsius value C. While the equation is C = 5/9 * (F - 32), as an exercise use two state...

mehr als 12 Jahre vor

Gelöst


Create a row array using double colon operator
Create a row array from 9 to 1, using the double colon operator.

mehr als 12 Jahre vor

Gelöst


Remove the middle element from a vector
Remove the middle element of a vector? *Example:* [1,2,3] should return 2 [1,2,3,4] should return 2 [] should return...

mehr als 12 Jahre vor

Gelöst


Self-Description
This is a simplified version of the <http://xkcd.com/688/ *xkcd comic* by the same name>. Simply return the angle (in degrees...

mehr als 12 Jahre vor

Problem


Remove element(s) from cell array
You can easily remove an element (or a column in any dimension) from a normal matrix, but assigning that value (or range) empty....

mehr als 12 Jahre vor | 17 | 1994 Lösungsvorschläge

Gelöst


Grid traversal
Given a line defined by (x1,y1) & (x2,y2),return the number of squares that the line crosses on the grid (a square is 1x1). ...

mehr als 12 Jahre vor

Gelöst


Better Index Number
Let's say you want to save many, many files and append these files with a certain sortable index number. As you probably know, y...

mehr als 12 Jahre vor

Gelöst


Convert this color - RGB Vector to Hex String
Given a 3 element RGB vector corresponding to a color (given by the MATLAB color spec <http://www.mathworks.com/help/matlab/ref/...

mehr als 12 Jahre vor

Gelöst


Get top 5 Cody Player Emails Automatically
Yes, this is a little scary and also entirely possible to do in MATLAB, so let's do it! Looking at the list of the players <h...

mehr als 12 Jahre vor

Gelöst


What's the News?
Get the top headline from Google news! Presumably using urlread and regular expressions, get what the current headline at Google...

mehr als 12 Jahre vor

Gelöst


German tank problem
The <http://en.wikipedia.org/wiki/German_tank_problem German tank problem> is a well-known statistical problem that attempts to ...

mehr als 12 Jahre vor

Gelöst


Count decimal digits of a number
* Given an integer number you have to return the number of its digits. * For example 248 has 3 digits and 1589 has 4 digits ...

mehr als 12 Jahre vor

Gelöst


Read 100 *.dat files and save them with *.txt extension
I have 100 *.dat files that I need read them and do some change on them then finally save them as *.txt ASCII files but I don't ...

mehr als 12 Jahre vor

Gelöst


Finding neighbors of [-1:1] in a matrix....
Hello All! Well I found this one fun to figure out, all you have to do is make a matrix of 1's or 0's (true or false) that sh...

mehr als 12 Jahre vor

Gelöst


saving m-file
when I save M-file the program is closed suddenly and also it does so when I choose (open) from file menu

mehr als 12 Jahre vor

Gelöst


Connect Four Win Checker
<http://en.wikipedia.org/wiki/Connect_Four Connect Four> is a game where you try to get four pieces in a row. For this problem, ...

mehr als 12 Jahre vor

Gelöst


Longest Divisor Run
Given the vector a, find the longest run of consecutive numbers that can be evenly divided by the same number d where d > 1. ...

mehr als 12 Jahre vor

Gelöst


Write a cubic formula function
Create a function that will output the three roots of a cubic equation specified by the 4 coefficients listed as input. The outp...

mehr als 12 Jahre vor

Mehr laden