- #1
Meteochick
- 2
- 0
Hello,
I am wondering if it is possible to append a number as a string to the end of a variable name in Matlab? I am working with radar data and want to create structures for each volume of data, but I do not know how many volumes are contained in each file, and I have so many files I do not want to have to go through and count each of them! Here's an explanation of my data and what I'm trying to do.
Velocity and reflectivity data are collected at a specific number of range points, over a series of azimuth angles which is repeated over a known number of elevation angles. The grouping of range, azimuth, elevation is what I am calling a volume. Each data file I am dealing with contains 5 minutes worth of data, but the number of volumes collected is not constant because the number of elevations or azimuth angles can change from file to file. I want to create structures for each of the volumes within the file so that I have something like: Volume1 =struct('El1',{Elevation_Angles},'Range1',{Ranges},'V1',{Velocity_data},'Ref1',{Reflectivity_data}, Volume2=(The same thing except for the next volume)...
Is it possible to have some representation of the count of the volumes and append to the variable name 'Volume' so that I can create these different structures without needing prior knowledge of the number of volumes? (i.e. something like Volume($count), as it would be in a c-shell script?) OR, is there a better way of doing what I'm trying to do here without needing separate structures?
Thanks so much!
I am wondering if it is possible to append a number as a string to the end of a variable name in Matlab? I am working with radar data and want to create structures for each volume of data, but I do not know how many volumes are contained in each file, and I have so many files I do not want to have to go through and count each of them! Here's an explanation of my data and what I'm trying to do.
Velocity and reflectivity data are collected at a specific number of range points, over a series of azimuth angles which is repeated over a known number of elevation angles. The grouping of range, azimuth, elevation is what I am calling a volume. Each data file I am dealing with contains 5 minutes worth of data, but the number of volumes collected is not constant because the number of elevations or azimuth angles can change from file to file. I want to create structures for each of the volumes within the file so that I have something like: Volume1 =struct('El1',{Elevation_Angles},'Range1',{Ranges},'V1',{Velocity_data},'Ref1',{Reflectivity_data}, Volume2=(The same thing except for the next volume)...
Is it possible to have some representation of the count of the volumes and append to the variable name 'Volume' so that I can create these different structures without needing prior knowledge of the number of volumes? (i.e. something like Volume($count), as it would be in a c-shell script?) OR, is there a better way of doing what I'm trying to do here without needing separate structures?
Thanks so much!