The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Combining series of matrices
Replies: 10   Last Post: Jan 26, 2013 10:05 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 9,850
Registered: 6/7/07
Re: Combining series of matrices
Posted: Jan 22, 2013 10:35 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 1/21/2013 4:12 PM, dpb wrote:
> On 1/20/2013 11:30 AM, Ehsan wrote:
>> "james bejon" wrote in message <kdh908$g0c$>...
>>> If you supply some code that generates the relevant data structure,
>>> I'll happily have a go...

> ...

...Previous code elided for brevity to correct a syntax problem of
concatenating a structure w/ an array...
> Salt to suit...

Concatenate the L and R arrays then create the structure in the end--

while date<=end_date

NB that if there are a large number and/or they are large, this will get
slow as it grows. If you know the sizes a priori you can help by
preallocating a large-enough array and populate it explicitly w/ ranges.
Keeping the full sizes and then collapsing the null entries at the end
before creating the structure may also be faster than doing each first;
I've not tested that w/ any random data to see if can tell any
significant difference.


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.