I have a text file 'Busdata8.txt' which has data as follows:
%|Bus | Type | Vsp | theta | PGi | QGi | PLi | QLi | Qmin | Qmax | Transaction |
1 1 1.0 0 0 0 0 0 0 0 1 2 2 1.03 0 550 0 0 0 0 0 1 3 3 1.0 0 0 0 350 0 0 0 1 4 3 1.0 0 0 0 300 0 0 0 1 5 3 1.0 0 0 0 250 0 0 0 1 6 3 1.0 0 0 0 100 0 0 0 2 7 3 1.0 0 0 0 100 0 0 0 3 8 2 1.05 0 100 0 0 0 0 0 2 8 2 1.05 0 100 0 0 0 0 0 3I want to skip the wordings in the first line and extract the numerical data into an array, something look like this:Array = 1 1 1.0 0 0 0 0 0 0 0 1 2 2 1.03 0 550 0 0 0 0 0 1 3 3 1.0 0 0 350 0 0 0 0 1 4 3 1.0 0 0 300 0 0 0 0 1 5 3 1.0 0 0 250 0 0 0 0 1 6 3 1.0 0 0 100 0 0 0 0 2 7 3 1.0 0 0 100 0 0 0 0 3 8 2 1.05 0 100 0 0 0 0 0 2 8 2 1.05 0 100 0 0 0 0 0 3
Kindly help me out. Thanks in advance.
Best Answer