Hi guys! I'm writing about a problem with a code. I explain: I have a .txt file named input_luglio2012.txt, from where I need to import my data. The file is this:
Numero richieste n7Numero mezzi m2Tempo ritiro/consegna T20localita ritiro ri2 4 6 8 10 12 13localita consegna ci3 5 7 11 9 15 14Tempi tij0 89 82 126 122 140 143 149 147 144 99 137 74 89 7789 0 82 124 121 141 142 143 77 143 99 147 122 124 9182 82 0 90 121 98 142 98 149 142 143 93 122 214 91126 124 90 0 126 141 146 143 146 148 143 143 122 124 121122 121 121 126 0 141 146 147 144 146 143 143 122 124 121140 141 98 141 141 0 140 149 147 149 143 143 144 139 137143 142 142 146 146 140 0 76 143 143 143 121 144 139 137149 143 98 143 147 149 76 0 99 146 143 141 144 139 137147 77 149 146 144 147 143 99 0 99 143 141 144 139 137144 143 142 148 146 149 143 146 99 0 143 141 144 139 13799 99 93 143 143 143 143 143 143 143 0 121 144 139 137137 147 143 143 143 143 121 141 141 141 121 0 94 139 13774 122 122 122 122 144 144 144 144 144 144 94 0 83 7389 124 124 124 124 139 139 139 139 139 139 139 83 0 8377 91 91 121 121 137 137 137 137 137 137 137 73 83 0
I need to have in the workspace:
n=7;m=2;T=20;R=[2 4 6 8 10 12 13];C=[3 5 7 11 9 15 14];T=[0 89 82 126 122 140 143 149 147 144 99 137 74 89 7789 0 82 124 121 141 142 143 77 143 99 147 122 124 9182 82 0 90 121 98 142 98 149 142 143 93 122 214 91126 124 90 0 126 141 146 143 146 148 143 143 122 124 121122 121 121 126 0 141 146 147 144 146 143 143 122 124 121140 141 98 141 141 0 140 149 147 149 143 143 144 139 137143 142 142 146 146 140 0 76 143 143 143 121 144 139 137149 143 98 143 147 149 76 0 99 146 143 141 144 139 137147 77 149 146 144 147 143 99 0 99 143 141 144 139 137144 143 142 148 146 149 143 146 99 0 143 141 144 139 13799 99 93 143 143 143 143 143 143 143 0 121 144 139 137137 147 143 143 143 143 121 141 141 141 121 0 94 139 13774 122 122 122 122 144 144 144 144 144 144 94 0 83 7389 124 124 124 124 139 139 139 139 139 139 139 83 0 8377 91 91 121 121 137 137 137 137 137 137 137 73 83 0];
How can I proceed? I was thinking about the function "textread", but I have many problems concerning the text format!
Please help me!
Thank you,
Manuele
Best Answer