Solved


Go to the head of the class!
You're given a matrix and a single number. If that number is in the matrix, reorder the matrix so that number is in the first r...

6 years ago

Solved


Find Pseudo-Cyclic Number
A cyclic number is an integer in which cyclic permutations of the digits are successive multiples of the number https://en.wikip...

6 years ago

Solved


Find the numeric characters in a string and return their index
Given a string S, return the index of any numeric characters. S = 'The next meeting will be held in 2 weeks.'; idx = fin...

6 years ago

Solved


Too Many Zeros, Dump Them!
Sometimes when I create a matrix, I use this syntax: a = zeros(1000,1000); But when the function ends, I find that I don'...

6 years ago

Solved


Cookie Cutters
Given a larger and smaller matrix, perform element-by-element multiplication on the smaller matrix and a sub-matrix of the large...

6 years ago

Solved


Pairwise column flip
Given matrix *M_in*, flip every pair of columns. So if *M_in* is 1 2 3 4 1 2 3 4 then *M_out* is 2 1 4 3 2 1 4 3 ...

6 years ago

Solved


Negative without '-'
Simple: return a negative number without using the '-' sign. Thanks to Problem <https://www.mathworks.com/matlabcentral/cody/...

6 years ago

Solved


Raise Matrix to Power
For a given square matrix x and scalar a, find x^a without using '^' or 'mpower'.

6 years ago

Solved


Numbers in extended form
Shhhhhhh. Don't tell my daddy, but I'm borrowing his Cody account so all of you very smart people can help me out. I just star...

6 years ago

Solved


Converting numbers back from extended form
Thanks for all the help you guys gave me on writing out the numbers in extended form in <http://www.mathworks.com/matlabcentral/...

6 years ago

Solved


7 segment LED display
Given a whole number, output how many segments would be lit up to display it on a 7 segment LED display (see Wikipedia: <http://...

6 years ago

Solved


How many bottles can you drink?
Sometimes if you buy a drink in a glass bottle you can return that bottle and get some money back. Let's assume we have "x" a...

6 years ago

Solved


How to Concatenate two strings?
How to Concatenate two strings?

6 years ago

Solved


Find the repeating elements and repetitions of a row vector.
So let's say that x is a vector, for example, x = [4, 4, 5, 5, 5, 6, 7, 7,8, 8, 8, 8] Now we want to get the following two ve...

6 years ago

Solved


random picture with random colours
write a function which creates a random(x,y) matrix with random RGB colours for example create_pic(5,5) gives us a 3d matrix. ...

6 years ago

Solved


does it touch ?
given a sentence, tell how much it touches. input : string output : how much it touches touching : a bilabial phoneme d...

6 years ago

Solved


Perl 4: unshift
_This is part of a series of perl function which were very helpful for many perl programmers. Could you implement it in Matlab?_...

6 years ago

Solved


Perl 3: shift
_This is part of a series of perl function which were very helpful for many perl programmers. Could you implement it in Matlab?_...

6 years ago

Solved


Perl 2: pop
_This is part of a series of perl function which were very helpful for many perl programmers. Could you implement it in Matlab?_...

6 years ago

Solved


Perl 1: push
_This is part of a series of perl function which were very helpful for many perl programmers. Could you implement it in Matlab?_...

6 years ago

Solved


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

6 years ago

Solved


compress sequence into intervals
You're given a row vector of monotonically increasing integers most of which are consecutive. Find the upper and lower bounds of...

6 years ago

Solved


expand intervals vol.3
This is the next problem after <http://www.mathworks.co.uk/matlabcentral/cody/problems/2528 2528> and <http://www.mathworks.co.u...

6 years ago

Solved


expand intervals vol.2
Similar to problem <http://www.mathworks.co.uk/matlabcentral/cody/problems/2528 2528>. This is a more general case, when bounds ...

6 years ago

Solved


Largest territory
Determine whose territory is largest. If there are multiple numbers tied for the largest territory, return the smallest number. ...

6 years ago

Solved


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

6 years ago

Solved


Set a diagonal
Given a matrix M, row vector v of appropriate length, and diagonal index d (where 0 indicates the main diagonal and off-diagonal...

6 years ago

Solved


Implement a bubble sort technique and output the number of swaps required
A bubble sort technique compares adjacent items and swaps them if they are in the wrong order. This is done recursively until al...

6 years ago

Solved


Decimation - Optimized for speed
This problem is similar to http://www.mathworks.com/matlabcentral/cody/problems/1092-decimation, only this time the score will b...

6 years ago

Solved


Cumulative minimum of an array
Find the cumulative minimum of an array without using the built-in function <http://www.mathworks.com/help/matlab/ref/cummin.htm...

6 years ago

Load more