| MATLAB Central > MATLAB Newsreader > Allocating memory for a cell array of matrices |
|
|
|
Subject: Allocating memory for a cell array of matrices From: Jim Rockford Date: 20 Aug, 2009 02:48:41 Message: 1 of 20 |
|
Suppose I want to allocate memory for an m x n cell array X |
|
Subject: Allocating memory for a cell array of matrices From: Jos Date: 20 Aug, 2009 06:25:17 Message: 2 of 20 |
|
Jim Rockford <jim.rockford1@gmail.com> wrote in message <7435e962-1791-4d2a-9ef3-e653aed7873f@d21g2000vbm.googlegroups.com>... |
|
Subject: Allocating memory for a cell array of matrices From: Bruno Luong Date: 20 Aug, 2009 07:07:03 Message: 3 of 20 |
|
Jim and Jos -- actually if the goal is to preallocate memory, then NO these two methods are *not* equivalent. The FOR-LOOP will allocate m x n separate zero blocks. The DEAL method will make each cell point toward a common shared zero matrix. So the DEAL method does not really allocate memory. |
|
Subject: Allocating memory for a cell array of matrices From: James Tursa Date: 20 Aug, 2009 07:28:02 Message: 4 of 20 |
|
Jim Rockford <jim.rockford1@gmail.com> wrote in message <7435e962-1791-4d2a-9ef3-e653aed7873f@d21g2000vbm.googlegroups.com>... |
|
Subject: Allocating memory for a cell array of matrices From: Bruno Luong Date: 20 Aug, 2009 07:35:19 Message: 5 of 20 |
|
"James Tursa" <aclassyguy_with_a_k_not_a_c@hotmail.com> wrote in message <h6itu2$21r$1@fred.mathworks.com>... |
|
Subject: Allocating memory for a cell array of matrices From: Matt Date: 20 Aug, 2009 08:54:02 Message: 6 of 20 |
|
"James Tursa" <aclassyguy_with_a_k_not_a_c@hotmail.com> wrote in message <h6itu2$21r$1@fred.mathworks.com>... |
|
Subject: Allocating memory for a cell array of matrices From: Jan Simon Date: 22 Aug, 2009 00:48:02 Message: 7 of 20 |
|
Dear Jos! |
|
Subject: Allocating memory for a cell array of matrices From: James Tursa Date: 22 Aug, 2009 02:42:05 Message: 8 of 20 |
|
"Jan Simon" <matlab.THIS_YEAR@nMINUSsimon.de> wrote in message <h6nf82$41k$1@fred.mathworks.com>... |
|
Subject: Allocating memory for a cell array of matrices From: James Tursa Date: 22 Aug, 2009 02:50:20 Message: 9 of 20 |
|
"James Tursa" <aclassyguy_with_a_k_not_a_c@hotmail.com> wrote in message <h6nltt$u2$1@fred.mathworks.com>... |
|
Subject: Allocating memory for a cell array of matrices From: Jim Rockford Date: 24 Aug, 2009 01:36:30 Message: 10 of 20 |
|
On Aug 20, 3:28 am, "James Tursa" |
|
Subject: Allocating memory for a cell array of matrices From: James Tursa Date: 24 Aug, 2009 07:44:01 Message: 11 of 20 |
|
Jim Rockford <jim.rockford1@gmail.com> wrote in message <66880d65-cf7e-4fa4-b5bf-2632cd77c617@j19g2000vbp.googlegroups.com>... |
|
Subject: Allocating memory for a cell array of matrices From: Jim Rockford Date: 30 Aug, 2009 01:13:25 Message: 12 of 20 |
|
On Aug 24, 3:44 am, "James Tursa" |
|
Subject: Allocating memory for a cell array of matrices From: Matt Fig Date: 30 Aug, 2009 01:23:01 Message: 13 of 20 |
|
>> clear all |
|
Subject: Allocating memory for a cell array of matrices From: Bruno Luong Date: 30 Aug, 2009 02:30:20 Message: 14 of 20 |
|
Jim Rockford <jim.rockford1@gmail.com> wrote in message <c47d4754-c9fd-4d71-9def-0983711ab7cf@q14g2000vbi.googlegroups.com>... |
|
Subject: Allocating memory for a cell array of matrices From: Matt Fig Date: 30 Aug, 2009 03:24:03 Message: 15 of 20 |
|
Perhaps I am missing something (wouldn't be the first time), but Bruno how could you explain these results? I know you are much more CS savvy than myself, so if I have made a bad assumption, please tell me :-). |
|
Subject: Allocating memory for a cell array of matrices From: Bruno Luong Date: 30 Aug, 2009 08:41:10 Message: 16 of 20 |
|
Matt, Matlab is so smart that sometime it hurts. When we do this: |
|
Subject: Allocating memory for a cell array of matrices From: James Tursa Date: 30 Aug, 2009 08:59:03 Message: 17 of 20 |
|
"Matt Fig" <spamanon@yahoo.com> wrote in message <h7crcj$rs0$1@fred.mathworks.com>... |
|
Subject: Allocating memory for a cell array of matrices From: James Tursa Date: 30 Aug, 2009 09:10:04 Message: 18 of 20 |
|
"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <h7ddv6$15e$1@fred.mathworks.com>... |
|
Subject: Allocating memory for a cell array of matrices From: Jan Simon Date: 30 Aug, 2009 10:25:03 Message: 19 of 20 |
|
Dear Matt Fig! |
|
Subject: Allocating memory for a cell array of matrices From: Matt Fig Date: 30 Aug, 2009 13:44:02 Message: 20 of 20 |
|
Thanks Bruno and James, that really makes it stand out! |
A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.
| Tag Activity for This Thread | ||
|---|---|---|
| Tag | Applied By | Date/Time |
| cell array | Sprinceana | 22 Aug, 2009 03:40:56 |
| cell array of m... | Sprinceana | 22 Aug, 2009 03:40:56 |
Contact us at files@mathworks.com
