[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Structures and tensors
From: |
Jordi Gutierrez Hermoso |
Subject: |
Re: Structures and tensors |
Date: |
Wed, 2 Aug 2006 13:30:24 -0400 |
On 02/08/06, Peter Cloetens <address@hidden> wrote:
Then I rewrote everything with cells, where each element of the cell
array corresponds to 1 matrix. This improved the speed very considerably.
I think I'm having similar issues right now with some weather
equations. Any idea what the order of magnitude of the improvement is?
You use:
E{k} instead of E(:,:,k)
As long as you do not need to access your data in the third dimension this
is much more efficient and readable.
How about if I need FOUR dimensions? See, I'm modelling some weather
dynamics, and I would like to keep track of the passage of time, and
I'm not assuming the atmosphere to be thin enough to consider it
two-dimensional (though I probably should). So I end up having rank 4
tensors, one for each spacetime dimension. :-/
Any suggestion how to improve this?
Thanks,
- Jordi G. H.