A résolu


Binary numbers
Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...

presque 14 ans il y a

A résolu


Counting Money
Add the numbers given in the cell array of strings. The strings represent amounts of money using this notation: $99,999.99. E...

presque 14 ans il y a

A résolu


Find the longest sequence of 1's in a binary sequence.
Given a string such as s = '011110010000000100010111' find the length of the longest string of consecutive 1's. In this examp...

presque 14 ans il y a

Réponse apportée
Parallel Problem: Get keyboard input in 60 sec, otherwise jump out
Shijia, you can do something like this using callbacks. Here's an example using figure callbacks. Save it as myFunction.m and se...

presque 14 ans il y a | 1

| A accepté

A résolu


Find the alphabetic word product
If the input string s is a word like 'hello', then the output word product p is a number based on the correspondence a=1, b=2, ....

presque 14 ans il y a

A résolu


Pascal's Triangle
Given an integer n >= 0, generate the length n+1 row vector representing the n-th row of <http://en.wikipedia.org/wiki/Pascals_t...

presque 14 ans il y a

A résolu


inner product of two vectors
inner product of two vectors

presque 14 ans il y a

A résolu


Construct a string from letters and counts
Given two input arrays like this: [5,3,1] ['a','b','c'] Output a string that contains each letter the specified num...

presque 14 ans il y a

A résolu


Make one big string out of two smaller strings
If you have two small strings, like 'a' and 'b', return them put together like 'ab'. 'a' and 'b' => 'ab' For extra ...

presque 14 ans il y a

A résolu


No Twins?
Write a function that accepts as input a vector and returns the same vector, but retaining only the first occurrence of an eleme...

presque 14 ans il y a

A résolu


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

presque 14 ans il y a

A résolu


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

presque 14 ans il y a

A résolu


Which values occur exactly three times?
Return a list of all values (sorted smallest to largest) that appear exactly three times in the input vector x. So if x = [1 2...

presque 14 ans il y a

Problème


Find last non-zero in a given dimension
You are given a logical matrix *BW* _of any dimension_, and a dimension *dim*. You need to find the locations of the last non-ze...

presque 14 ans il y a | 2 | 49 solveurs

A résolu


Find last non-zero in a given dimension
You are given a logical matrix *BW* _of any dimension_, and a dimension *dim*. You need to find the locations of the last non-ze...

presque 14 ans il y a

A résolu


Find the palindrome
Given the string a, find the longest palindromic sub-string b. So when a = 'xkayakyy'; you should return b = 'kayak';

presque 14 ans il y a

A résolu


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

presque 14 ans il y a

A résolu


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

presque 14 ans il y a

A résolu


Who Has the Most Change?
You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

presque 14 ans il y a

Réponse apportée
problem with mean in cell arrays
v{k} = mean([m{k}.e{:}]) The *mean()* function calculates the mean of an array of numbers, not a cell. The above should ...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
Last non nan observation
Here I can plug a file exchange entry: http://www.mathworks.com/matlabcentral/fileexchange/27755-n-dimensional-find Im =...

presque 14 ans il y a | 0

Réponse apportée
rotate a plane onto another plane
David, let me introduce you to geom3d. I'm a fan of, user of, and occasional contributor to it. http://www.mathworks.com/matl...

presque 14 ans il y a | 1

| A accepté

Réponse apportée
how can i find the number of the overlapped white pixels between 2 black and white images?
Im1 = rand(50,50)>0.2; % your first image Im2 = rand(50,50)>0.6; % your transformed image overlapIm = Im1 & Im2; numS...

presque 14 ans il y a | 1

A résolu


How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

presque 14 ans il y a

A résolu


radius of a spherical planet
you just measured its surface area, that is the input.

presque 14 ans il y a

A résolu


Roll the Dice!
*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...

presque 14 ans il y a

A résolu


Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

presque 14 ans il y a

A résolu


Check to see if a Sudoku Puzzle is Solved
*Description:* Your task, should you choose to accept it, is to make a function that checks to see if a 9x9 matrix of integer...

presque 14 ans il y a

A résolu


Remove the small words from a list of words.
Your job is to tidy up a list of words that appear in a string. The words are separated by one or more spaces. Remove all words ...

environ 14 ans il y a

A résolu


Get the area codes from a list of phone numbers
Given a string of text with phone numbers in it, return a unique'd cell array of strings that are the area codes. s = '508-647...

environ 14 ans il y a

Charger plus