Hi all
I am hoping you can help me with this query. I am looking to automatically change the values in a matrix of proportions (shown as a proportion of 1000 vehicles). Unfortunately though the matrix below hasn't copied over very well from textpad and the columns are not in line!!
Shown below, '8002' is the three-arm node (junction) number in a traffic model and 305, 304 and 303 are the inbound links into the node. To illustrate, in the second row, 8 out of 1000 vehicles u-turn, 38 go to 304 and the rest (954) go to 303.
8002 P 305 304 303
305 8 38 954
304 148 0 852
303 794 206 0
I have extracted the above from a text file and I need to replace the proportions above exactly with new values, making sure the numbers are all still in line.
For example, if I changed the first line to having 12 u-turners, 150 to go to '304' and 838 to go to '303' I would not want the columns to then go out of line due to the extra 2 characters in the '305' column and extra 1 character in the '304' column, i.e.:
8002 P 305 304 303
305 12 150 838
304 148 0 852
303 794 206 0
Any help appreciated. I get the feeling the solution may involved the 'LEFT, MID and RIGHT' functions... or maybe not
Yours appreciatively,
I am hoping you can help me with this query. I am looking to automatically change the values in a matrix of proportions (shown as a proportion of 1000 vehicles). Unfortunately though the matrix below hasn't copied over very well from textpad and the columns are not in line!!
Shown below, '8002' is the three-arm node (junction) number in a traffic model and 305, 304 and 303 are the inbound links into the node. To illustrate, in the second row, 8 out of 1000 vehicles u-turn, 38 go to 304 and the rest (954) go to 303.
8002 P 305 304 303
305 8 38 954
304 148 0 852
303 794 206 0
I have extracted the above from a text file and I need to replace the proportions above exactly with new values, making sure the numbers are all still in line.
For example, if I changed the first line to having 12 u-turners, 150 to go to '304' and 838 to go to '303' I would not want the columns to then go out of line due to the extra 2 characters in the '305' column and extra 1 character in the '304' column, i.e.:
8002 P 305 304 303
305 12 150 838
304 148 0 852
303 794 206 0
Any help appreciated. I get the feeling the solution may involved the 'LEFT, MID and RIGHT' functions... or maybe not
Yours appreciatively,