Reversing the order of elements in a structure array

Discussion in 'MATLAB' started by Nicholas Stull, Jun 10, 2004.

  1. I'm attempting to write a program that will access and analyze both
    the first n elements of a structure array and the last n elements of
    the same structure array.

    The structure array is of the form

    s = sprintf('%s%s',directory,files(;

    l ranges from 1 to a number (defaulted as 1, but not necessarily)
    k ranges from 1 to a number (almost never 1, which is why this program
    is being written)

    And I am trying to analyze the last elements of the array. (i.e. if s
    calls on elements 1-50, i'm trying to get it to call 2806-2855) and
    the computation time, while i have an algorithm that technically
    works, is SLOW!
    The time it takes for the first part to run with 25 passes is only 56
    seconds, whereas the last part may take up to a half hour. I'm not an
    expert at this stuff, and could really use some guidance on this one.
    Nicholas Stull, Jun 10, 2004
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.