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: setting multiple structure values
Replies: 4   Last Post: Mar 1, 2014 4:20 PM

Advanced Search

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

Posts: 30
Registered: 4/14/09
setting multiple structure values
Posted: May 31, 2012 4:08 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi all,

This is probably an easy question but I can't figure it out :(

I'm currently doing this...
for n=1:length(PlotRecords)
PlotRecords(n).PlotLatitude = CorrectedLat(n);
PlotRecords(n).PlotLongitude = CorrectedLon(n);

I want to speed this up so I'm trying to do something like...

[PlotRecords(1:n).PlotLatitude] = CorrectedLat(1:n);
??? Indexing cannot yield multiple results.

PlotRecords is the same length as CorrectedLat

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.