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.

plus de 13 ans il y a

A résolu


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

plus de 13 ans il y a

A résolu


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

plus de 13 ans il y a

A résolu


Back and Forth Rows
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...

plus de 13 ans il y a

A résolu


Most nonzero elements in row
Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...

plus de 13 ans il y a

A résolu


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

plus de 13 ans il y a

A résolu


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

plus de 13 ans il y a

A résolu


Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

plus de 13 ans il y a

Publié le


Logical Indexing – Multiple Conditions
I've talked about logical indexing before in some of the linked posts, but recent work makes me want to show it off again. ...

plus de 13 ans il y a

Thumbnail

Publié le


Introduction to Functional Programming with Anonymous Functions, Part 3
Tucker McClure is an Application Engineer with The MathWorks. He spends his time helping our customers accelerate their work...

plus de 13 ans il y a

Thumbnail

Publié le


Introduction to Functional Programming with Anonymous Functions, Part 2
Tucker McClure is an Application Engineer with The MathWorks. He spends his time helping our customers accelerate their work...

plus de 13 ans il y a

Thumbnail

Publié le


Introduction to Functional Programming with Anonymous Functions, Part 1
Tucker McClure is an Application Engineer with The MathWorks. He spends his time helping our customers accelerate their work...

plus de 13 ans il y a

Thumbnail

Publié le


End of Year Suggestion: Steve on Counting
I just read the latest post on Steve Eddins image processing blog. I recommend you read it too. It discusses how to count...

plus de 13 ans il y a

Thumbnail

Publié le


Measuring GPU Performance
Today I welcome back guest blogger Ben Tordoff who previously wrote here on how to generate a fractal on a GPU. He is going...

plus de 13 ans il y a

Thumbnail

Publié le


Understanding Array Preallocation
Today I would like to introduce guest blogger Jeremy Greenwald who works in the Development group here at MathWorks. Jeremy...

plus de 13 ans il y a

Thumbnail

Publié le


Partitioning a Vector
Recently on the MATLAB newsgroup, there was a thread asking how to split up a vector into pieces which were each...

plus de 13 ans il y a

Thumbnail

Réponse apportée
Problem when assigning vectors
First, Mike, there is no reason to preallocate the vector b with zeros since you overwrite the variable in the next statement. ...

plus de 13 ans il y a | 1

Publié le


MathWorks Certification
Today I would like to introduce guest blogger John Kotwicki, who works in the Training Services group here at MathWorks. ...

plus de 13 ans il y a

Thumbnail

Publié le


Learning to Love Regular Expressions
Today I’d like to introduce guest blogger Sarah Wait Zaranek who works for the MATLAB Marketing team here at MathWorks....

plus de 13 ans il y a

Thumbnail

Publié le


When is a Number Perfect?
Answer: When the sum of all divisors of a positive integer, except the number itself, equals the number. Here's a reference...

plus de 13 ans il y a

Thumbnail

Publié le


The MATLAB R2012b Desktop – Part 3: MATLAB Apps
Today, David Garrison, our guest blogger, will complete his series on the R2012b Desktop.... read more >>

plus de 13 ans il y a

Thumbnail

Publié le


The MATLAB R2012b Desktop – Part 2: Customizing the R2012b MATLAB Desktop
Today, David Garrison, our guest blogger, will continue his series on the R2012b Desktop.... read more >>

plus de 13 ans il y a

Thumbnail

Publié le


The MATLAB R2012b Desktop – Part 1: Introduction to the Toolstrip
Today I’d like to introduce a guest blogger, David Garrison, who is a MATLAB Product Manager here at MathWorks. Over the...

plus de 13 ans il y a

Thumbnail

Publié le


Thoughts about Anonymous Functions
One of the reasons I like using anonymous functions is because they allow me to express whatever function I want to use as a...

presque 14 ans il y a

Thumbnail

Publié le


Using Symbolic Equations And Symbolic Functions In MATLAB
I am pleased to introduce guest blogger Kai Gehrs. Kai is a developer for the Symbolic Math Toolbox.... read more >>

presque 14 ans il y a

Thumbnail

Publié le


Who, what, why, but not this
Dave Foti, who manages development of object oriented programming features in the MATLAB language, is back with a discussion...

presque 14 ans il y a

Thumbnail

Publié le


Web Treats
I have had occasion to visit MathWorks website recently and discovered a couple of interesting pages.... read more >>

presque 14 ans il y a

Thumbnail

Publié le


What’s “if” “all” about?
I recently posted about a GOTCHA with the expression a < x < b in MATLAB and Matt's comments made me look to see if I...

presque 14 ans il y a

Thumbnail

Publié le


Benford’s Law – What are the odds that the first digit is a ‘1’?
I'd like to introduce this week's guest blogger Sam Mirsky. Sam is an Application Engineer here at MathWorks...

environ 14 ans il y a

Thumbnail

Publié le


Why is Answer to 3 < A < 7 Unexpected?
There have been countless (not really!) times on the MATLAB newsgroup where a question of the sort written in...

environ 14 ans il y a

Thumbnail

Charger plus