Community Profile

# Pat Quillen

### MathWorks

44 2012 이후 총 참여 횟수

#### Pat Quillen's 배지

세부 정보 보기...

참여 게시물
보기 기준

답변 있음
Why is dst and idst 'not recommended'?
These functions are not recommended mostly because of where they live---namely the PDE toolbox. This discouragment is a step in...

약 2달 전 | 0

| 수락됨

해결됨

Return the largest number that is adjacent to a zero
This example comes from Steve Eddins' blog: <http://blogs.mathworks.com/steve/2009/05/27/learning-lessons-from-a-one-liner/ Lear...

7년 이상 전

해결됨

Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

7년 이상 전

해결됨

Target sorting
Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...

7년 이상 전

해결됨

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

7년 이상 전

해결됨

QWERTY coordinates
Given a lowercase letter or a digit as input, return the row where that letter appears on a <http://en.wikipedia.org/wiki/Keyboa...

7년 이상 전

해결됨

Love triangles
Given a vector of lengths [a b c], determines whether a triangle with non-zero area (in two-dimensional Euclidean space, smarty!...

7년 이상 전

해결됨

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

7년 이상 전

해결됨

Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

7년 이상 전

해결됨

Summing digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

7년 이상 전

해결됨

Duplicates
Write a function that accepts a cell array of strings and returns another cell array of strings *with only the duplicates* retai...

7년 이상 전

해결됨

Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

7년 이상 전

해결됨

Back to basics 11 - Max Integer
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive integer MATLAB can handle.

7년 이상 전

해결됨

Find the numeric mean of the prime numbers in a matrix.
There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...

7년 이상 전

해결됨

Factorize THIS, buddy
List the prime factors for the input number, in decreasing order. List each factor only once, even if the factorization includes...

7년 이상 전

해결됨

The Hitchhiker's Guide to MATLAB
Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".

7년 이상 전

해결됨

<http://en.wikipedia.org/wiki/Benford%27s_law Benford's Law> states that the distribution of leading digits is not random. This...

7년 이상 전

해결됨

Sort a list of complex numbers based on far they are from the origin.
Given a list of complex numbers z, return a list zSorted such that the numbers that are farthest from the origin (0+0i) appear f...

7년 이상 전

해결됨

Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

7년 이상 전

해결됨

Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the other numbers. Otherwise return false. E...

7년 이상 전

해결됨

Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

7년 이상 전

해결됨

Make an N-dimensional Multiplication Table
*INSTRUCTIONS* This is a multi-dimensional variant of the normal multiplication table used to teach elementary students multi...

7년 이상 전

해결됨

Remove any row in which a NaN appears
Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

7년 이상 전

해결됨

Given a and b, return the sum a+b in c.

7년 이상 전

해결됨

given 3 sides, find area of this triangle
1:3 -> 0; 3:5 -> 6

7년 이상 전

해결됨

Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

7년 이상 전

해결됨

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

7년 이상 전

해결됨

the return of the hackathon
You might have found a solution to our <http://www.mathworks.com/matlabcentral/cody/problems/205-hackathon-the-beginnings previo...

7년 이상 전

해결됨

Hackathon: the beginnings
I am thinking of a number between 1 and 10000... can you guess what this number is? *Description* The test suite has rando...

7년 이상 전

해결됨

Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

8년 이하 전