Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.
|
|
dpb
Posts:
6,677
Registered:
6/7/07
|
|
Re: help
Posted:
Feb 21, 2013 8:57 AM
|
|
On 2/21/2013 4:45 AM, Kanishka wrote: > I have a 612x15x15 matrix with 612 months temprature 15 lattitudes and > 15 longitudes. I want to save the 612 months temp for each latt,long > (i.e (1,1) (1,2)..,(2,1)(2,2)... (15,15)) into a new variable. >
That's probably not a real good way to progress in Matlab -- that'll leave you w/ 225 separate variables, not an easy thing to generalize w/ explicit variable names. If you create sequential names in the workspace ("Poof" variables in common parlance), it takes eval() to process them which syntax is both error prone and slow.
Better is likely to either make named fields in a sturcture or use cell arrays where a cell holds the desired conditions for a location or simply just use the indices directly. Read the doc section on "Why Avoid the Eval Function" for more details...
If that really doesn't satisfy, provide more specifics on how you want to process these data and why you think you need separate variables to begin with.
--
|
|
|
|