KatiLynSki
Civil/Environmental
- May 16, 2005
- 33
I am having a very difficult time with a very simple problem.
I have an array, RoadWidth[n (where n= 1..48). I want to add a constant to each of the values in the array. In my head this can be accomplished with a simple for loop but I just can't get it to work.
for n = 1..48
SubgradeWidth[n = (RoadWidth[n) + 2
This is obviously the wrong way to do it. (I know I could just add an array of the same size that has a 2 in each variable spots but that just seems like it would take up a lot more room on my calc sheet and would take more effort to change the 2 to any other variable that I want at some later date.)
Any insight on this lovely Friday morning?
THANKS
-KD
I have an array, RoadWidth[n (where n= 1..48). I want to add a constant to each of the values in the array. In my head this can be accomplished with a simple for loop but I just can't get it to work.
for n = 1..48
SubgradeWidth[n = (RoadWidth[n) + 2
This is obviously the wrong way to do it. (I know I could just add an array of the same size that has a 2 in each variable spots but that just seems like it would take up a lot more room on my calc sheet and would take more effort to change the 2 to any other variable that I want at some later date.)
Any insight on this lovely Friday morning?
THANKS
-KD