Loren on the Art of MATLAB

Archives

Expand All Months » November 2009  (1)
Detailed Monthly Archive
October 2009  (5)
Detailed Monthly Archive
September 2009  (2)
Detailed Monthly Archive
August 2009  (2)
Detailed Monthly Archive
July 2009  (5)
Detailed Monthly Archive
June 2009  (4)
Detailed Monthly Archive
May 2009  (3)
Detailed Monthly Archive
April 2009  (4)
Detailed Monthly Archive
March 2009  (5)
Detailed Monthly Archive
February 2009  (4)
Detailed Monthly Archive
January 2009  (3)
Detailed Monthly Archive
December 2008  (3)
Detailed Monthly Archive
November 2008  (5)
Detailed Monthly Archive
October 2008  (3)
Detailed Monthly Archive
September 2008  (3)
Detailed Monthly Archive
August 2008  (4)
Detailed Monthly Archive
July 2008  (4)
Detailed Monthly Archive
June 2008  (5)
Detailed Monthly Archive
May 2008  (2)
Detailed Monthly Archive
April 2008  (5)
Detailed Monthly Archive
March 2008  (3)
Detailed Monthly Archive
February 2008  (6)
Detailed Monthly Archive
January 2008  (3)
Detailed Monthly Archive
December 2007  (4)
Detailed Monthly Archive
November 2007  (4)
Detailed Monthly Archive
October 2007  (4)
Detailed Monthly Archive
September 2007  (3)
Detailed Monthly Archive
August 2007  (5)
Detailed Monthly Archive
July 2007  (3)
Detailed Monthly Archive
June 2007  (5)
Detailed Monthly Archive
May 2007  (3)
Detailed Monthly Archive
April 2007  (4)
Detailed Monthly Archive
March 2007  (5)
Detailed Monthly Archive
February 2007  (3)
Detailed Monthly Archive
January 2007  (4)
Detailed Monthly Archive
December 2006  (4)
Detailed Monthly Archive
November 2006  (5)
Detailed Monthly Archive
October 2006  (4)
Detailed Monthly Archive
September 2006  (4)
Detailed Monthly Archive
August 2006  (5)
Detailed Monthly Archive
July 2006  (4)
Detailed Monthly Archive
June 2006  (5)
Detailed Monthly Archive
May 2006  (4)
Detailed Monthly Archive
April 2006  (5)
Detailed Monthly Archive
March 2006  (5)
Detailed Monthly Archive
February 2006  (4)
Detailed Monthly Archive
January 2006  (4)
Detailed Monthly Archive
December 2005  (4)
Detailed Monthly Archive

Plugin by Geek With Laptop


Loren Shure works on design of the MATLAB language at The MathWorks. She writes here about once a week on MATLAB programming and related topics.

  • Loren: Ben- The reference link in my post documents the behavior of sum([]) and prod([]) (although the prod part only...
  • Ben: Loren/Andrey, A further advantage of having sum([])==0 and prod([])==1 is that it’s consistent with array...
  • Loren: OysterEngineer- I will SO take you up on that offer. Can’t wait for a good reason to visit now....
  • OysterEngineer: You know, I really do farm oysters part time. Give me some advance notice next time you are in this...
  • Loren: Andrey- Thanks for your thoughts. One way to think about why empty shouldn’t error for sum is the...
  • Andrey: Hi Loren! IMHO, sum([]) and prod([]) should throw an error, as most of the times it shows that some kind of...
  • Loren: OysterEngineer (love the name, by the way!)- Initializing with an empty to start a concatenation process makes...
  • Loren: Wes- Implicitly there are trailing 1 dimensions for all arrays in MATLAB. But they do get dropped by ndims,...
  • Loren: Janti- Check out the function bsxfun. It will do exactly what you are hoping - not expanding vectors to arrays...
  • Wes: I generally find MATLAB’s handling of empties to be fairly consistent. It helps to think of an M-by-N...

These postings are the author's and don't necessarily represent the opinions of The MathWorks.