Gelöst


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.

etwa 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Veröffentlicht


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

mehr als 13 Jahre vor

Thumbnail

Veröffentlicht


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

mehr als 13 Jahre vor

Thumbnail

Veröffentlicht


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

mehr als 13 Jahre vor

Thumbnail

Veröffentlicht


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

mehr als 13 Jahre vor

Thumbnail

Veröffentlicht


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

mehr als 13 Jahre vor

Thumbnail

Veröffentlicht


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

mehr als 13 Jahre vor

Thumbnail

Veröffentlicht


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

mehr als 13 Jahre vor

Thumbnail

Veröffentlicht


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

mehr als 13 Jahre vor

Thumbnail

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

mehr als 13 Jahre vor | 1

Veröffentlicht


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

mehr als 13 Jahre vor

Thumbnail

Veröffentlicht


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

mehr als 13 Jahre vor

Thumbnail

Veröffentlicht


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

mehr als 13 Jahre vor

Thumbnail

Veröffentlicht


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

mehr als 13 Jahre vor

Thumbnail

Veröffentlicht


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

mehr als 13 Jahre vor

Thumbnail

Veröffentlicht


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

mehr als 13 Jahre vor

Thumbnail

Veröffentlicht


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

mehr als 13 Jahre vor

Thumbnail

Veröffentlicht


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

fast 14 Jahre vor

Thumbnail

Veröffentlicht


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

fast 14 Jahre vor

Thumbnail

Veröffentlicht


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

fast 14 Jahre vor

Thumbnail

Veröffentlicht


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

fast 14 Jahre vor

Thumbnail

Veröffentlicht


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

fast 14 Jahre vor

Thumbnail

Veröffentlicht


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

etwa 14 Jahre vor

Thumbnail

Mehr laden