Solved

Perfect Square or not

find Given input x is perfect square or not,if yes then output y=1.else y=0

ongeveer 21 uur ago

Solved

The 5th Root

Write a function to find the 5th root of a number. It sounds easy, but the typical functions are not allowed (see the test su...

ongeveer 22 uur ago

Solved

String Array Basics, Part 4: Convert String Array with Missing Values to Cell Array

<http://www.mathworks.com/help/matlab/characters-and-strings.html String array> and cell array are two types of containers for s...

ongeveer 23 uur ago

Solved

String Array Basics, Part 3: Convert Cell Array with Missing Values to String Array

<http://www.mathworks.com/help/matlab/characters-and-strings.html String array> and cell array are two types of containers for s...

ongeveer 23 uur ago

Solved

String Array Basics, Part 2: Convert String Array to Cell 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...

ongeveer 24 uur 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: * ...

ongeveer 24 uur 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...

ongeveer 24 uur 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...

ongeveer 24 uur ago

Solved

Create a cell array out of a struct

Create a cell array out of a (single) struct with the fieldname in the first column and the value in the second column: in: ...

ongeveer 24 uur ago

Solved

Fix the last element of a cell array

Note: this is lifted directly from <http://www.mathworks.com/matlabcentral/answers/82825-puzzler-for-a-monday Puzzler for a Mond...

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

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

1 dag 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'

1 dag ago

Solved

Find matching parenthesis

One of the most indispensable things about a great text editor for programming is the ability to quickly jump between matching p...

1 dag ago

Solved

Mandelbrot Numbers

The <http://en.wikipedia.org/wiki/Mandelbrot_set Mandelbrot Set> is built around a simple iterative equation. z(1) = c z...

1 dag ago

Solved

Split a string into chunks of specified length

Given a string and a vector of integers, break the string into chunks whose lengths are given by the elements of the vector. Ex...

2 dagen ago

Solved

Use of regexp

Given a string, containing several sentences, such as: 'I played piano. John played football. Anita went home. Are you safe?...

2 dagen ago

Question

A question on regexprep

This is a question stem from a Cody Problem when I looked through those efficient solutions. Let's say I have the following code...

2 dagen ago | 1 answer | 0

Solved

It dseon't mettar waht oedrr the lrettes in a wrod are.

An internet meme from 2003 (read more <http://www.snopes.com/language/apocryph/cambridge.asp here>) asserted that readers are re...

2 dagen ago

Solved

Remove the polynomials that have positive real elements of their roots.

The characteristic equation for a dynamic system is a polynomial whose roots indicate its behavior. If any of the <http://www.ma...

4 dagen ago

Solved

Increment a number, given its digits

Take as input an array of digits (e.g. x = [1 2 3]) and output an array of digits that is that number "incremented" properly, (i...

4 dagen ago

Solved

Knight's Tour Checker

Given a matrix a, determine whether or not a legal <http://en.wikipedia.org/wiki/Knight's_tour knight's tour> is present. The kn...

5 dagen ago

Solved

Number of digits in an integer

Specifies how many digits in a given integer. Example: in=100 ==> out=3

5 dagen ago

Solved

Given an unsigned integer x, find the largest y by rearranging the bits in x

Given an unsigned integer x, find the largest y by rearranging the bits in x. Example: Input x = 10 Output y is 12 ...

5 dagen ago

Solved

Sum of big primes without primes

Inspired by Project Euler n°10 (I am quite obviously a fan). With problem n°250 by Doug, you can find some global methods to ...

5 dagen ago

Solved

Count photos

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

5 dagen ago

Solved

Create matrix of replicated elements

Given an input element x, and the dimensions, (m, n) return a matrix of size m x n filled with element x. Example: Input: ...

5 dagen ago

Solved

"mirror" matrix

Create n x 2n "mirror" matrix of this type: Examples For n = 2 m = [ 1 2 2 1 1 2 2 1 ] For n = 3 m = ...

5 dagen ago

Solved

Number of odd and even elements within matrix

Input(m) - any matrix with integers Output(n) - n(1)=number of odd elements, n(2)=number of even elements Example: * m=...

5 dagen ago