Solved


Draw a '4' in a zero matrix!

9 månader ago

Solved


Draw a '6' in a zero matrix!

9 månader ago

Solved


Draw a '9' in a zero matrix!

9 månader ago

Solved


Draw a '7' in a zero matrix!

9 månader ago

Solved


Draw a '8' in a zero matrix!

9 månader ago

Solved


Draw a '3' in a zero matrix!

9 månader ago

Solved


Draw a '2' in a zero matrix!

9 månader ago

Solved


Draw a '5' in a zero matrix!

9 månader ago

Solved


Draw a '1' in a zero matrix!

9 månader ago

Solved


Find nearest prime number less than input number
Find nearest prime number less than input number. For example: if the input number is 125, then the nearest prime number whi...

9 månader ago

Solved


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

9 månader ago

Solved


Find the next prime number
Find the next prime number or numbers for given n. For example: n = 1; out = 2; or n = [5 7]; out = [7 11]; ...

9 månader ago

Solved


Make a vector of prime numbers
Input(n) - length of vector with prime numbers Output(v) - vector of prime numbers Example: * n=1; v=2 * n=3; v=[2 3 5...

9 månader ago

Solved


Sophie Germain prime
In number theory, a prime number p is a *Sophie Germain prime* if 2p + 1 is also prime. For example, 23 is a Sophie Germain prim...

9 månader ago

Solved


The Goldbach Conjecture
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

9 månader ago

Solved


Mersenne Primes
A Mersenne prime is a prime number of the form M = 2^p - 1, where p is another prime number. For example, 31 is a Mersenne prim...

9 månader ago

Solved


Project Euler: Problem 7, Nth prime
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the Nth prime nu...

9 månader ago

Solved


Matrix with different incremental runs
Given a vector of positive integers a = [ 3 2 4 ]; create the matrix where the *i* th column contains the vector *1:a(i)...

9 månader ago

Solved


Ordinal numbers
Given an integer n, return the corresponding ordinal number as a character string. For example, ord(1)='1st' ord(2)=...

9 månader ago

Solved


Decimal Comparison
*Background* A utility of particular interest to Cody and other MATLAB ventures is comparing the equality of two numbers. In ...

9 månader ago

Solved


Guess Cipher
Guess the formula to transform strings as follows: 'Hello World!' --> 'Ifmmp Xpsme!' 'Can I help you?' --> 'Dbo J ifm...

9 månader ago

Solved


Natural numbers in string form
Create a cell array of strings containing the first n natural numbers. _Slightly_ harder than it seems like it should be. Ex...

9 månader ago

Solved


String Array Basics, Part 1: Convert Cell Array to String Array; No Missing Values
<http://www.mathworks.com/help/matlab/characters-and-strings.html String array> and cell array are two types of containers for s...

9 månader ago

Solved


Cell Counting: How Many Draws?
You are given a cell array containing information about a number of soccer games. Each cell contains one of the following: * ...

9 månader ago

Solved


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

9 månader ago

Solved


Convert a Cell Array into an Array
Given a square cell array: x = {'01', '56'; '234', '789'}; return a single character array: y = '0123456789'

9 månader ago

Solved


Convert a numerical matrix into a cell array of strings
Given a numerical matrix, output a *cell array of string*. For example: if input = 1:3 output is {'1','2','3'} whic...

9 månader ago

Solved


Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

9 månader ago

Solved


Set some matrix elements to zero
First get the maximum of each *row*, and afterwards set all the other elements to zero. For example, this matrix: 1 2 3 ...

10 månader ago

Load more