Info
This question is closed. Reopen it to edit or answer.
problem to get read data from CSV file or .xls file or .txt file
1 view (last 30 days)
Show older comments
Hallo there i have basically .csv file (energ_use.csv)file, i want to read these given data into Matlab to manipulate and forecast for weekdays from first week historical data to following week same day and so on Month and year. but a the beginning i am facing a bit problem to read sperately as column.CSV file in exact format in Matlab.but i can not, so i have decided to change csv file to xls file and then xls to .txt file then i was able to read as column but still i have face problem to get exact date and time setp as its original.
can anyone help me to solve this problem ? here is data in txt file and showed in matlab
CSV data for 1 month
Datum; Verluste kWh 01.01.2011 00:15; 242 01.01.2011 00:30; 240 01.01.2011 00:45; 239 01.01.2011 01:00; 236 01.01.2011 01:15; 232 01.01.2011 01:30; 228 01.01.2011 01:45; 225 01.01.2011 02:00; 219 01.01.2011 02:15; 216 01.01.2011 02:30; 212 01.01.2011 02:45; 208 01.01.2011 03:00; 204 01.01.2011 03:15; 201 01.01.2011 03:30; 196 01.01.2011 03:45; 194 01.01.2011 04:00; 192 01.01.2011 04:15; 191 01.01.2011 04:30; 188 01.01.2011 04:45; 189 01.01.2011 05:00; 187 01.01.2011 05:15; 189 01.01.2011 05:30; 191 01.01.2011 05:45; 188 01.01.2011 06:00; 187 01.01.2011 06:15; 188 01.01.2011 06:30; 186 01.01.2011 06:45; 187 01.01.2011 07:00; 189 01.01.2011 07:15; 191 01.01.2011 07:30; 191 01.01.2011 07:45; 191 01.01.2011 08:00; 194 01.01.2011 08:15; 198 01.01.2011 08:30; 198 01.01.2011 08:45; 196 01.01.2011 09:00; 200 01.01.2011 09:15; 204 01.01.2011 09:30; 210 01.01.2011 09:45; 214 01.01.2011 10:00; 220 01.01.2011 10:15; 224 01.01.2011 10:30; 228 01.01.2011 10:45; 235 01.01.2011 11:00; 239 01.01.2011 11:15; 246 01.01.2011 11:30; 249 01.01.2011 11:45; 254 01.01.2011 12:00; 256 01.01.2011 12:15; 260 01.01.2011 12:30; 258 01.01.2011 12:45; 260 01.01.2011 13:00; 260 01.01.2011 13:15; 258 01.01.2011 13:30; 259 01.01.2011 13:45; 258 01.01.2011 14:00; 257 01.01.2011 14:15; 255 01.01.2011 14:30; 255 01.01.2011 14:45; 258 01.01.2011 15:00; 257 01.01.2011 15:15; 260 01.01.2011 15:30; 260 01.01.2011 15:45; 264 01.01.2011 16:00; 273 01.01.2011 16:15; 284 01.01.2011 16:30; 292 01.01.2011 16:45; 302 01.01.2011 17:00; 313 01.01.2011 17:15; 319 01.01.2011 17:30; 324 01.01.2011 17:45; 329 01.01.2011 18:00; 332 01.01.2011 18:15; 332 01.01.2011 18:30; 331 01.01.2011 18:45; 333 01.01.2011 19:00; 333 01.01.2011 19:15; 331 01.01.2011 19:30; 325 01.01.2011 19:45; 321 01.01.2011 20:00; 319 01.01.2011 20:15; 314 01.01.2011 20:30; 306 01.01.2011 20:45; 298 01.01.2011 21:00; 292 01.01.2011 21:15; 287 01.01.2011 21:30; 281 01.01.2011 21:45; 277 01.01.2011 22:00; 273 01.01.2011 22:15; 274 01.01.2011 22:30; 269 01.01.2011 22:45; 264 01.01.2011 23:00; 252 01.01.2011 23:15; 248 01.01.2011 23:30; 241 01.01.2011 23:45; 233
txt data same
01.01.2011 00:15; 242 01.01.2011 00:30; 240 01.01.2011 00:45; 239 01.01.2011 01:00; 236 01.01.2011 01:15; 232 01.01.2011 01:30; 228 01.01.2011 01:45; 225 01.01.2011 02:00; 219 01.01.2011 02:15; 216 01.01.2011 02:30; 212 01.01.2011 02:45; 208 01.01.2011 03:00; 204 01.01.2011 03:15; 201 01.01.2011 03:30; 196 01.01.2011 03:45; 194 01.01.2011 04:00; 192 01.01.2011 04:15; 191 01.01.2011 04:30; 188 01.01.2011 04:45; 189 01.01.2011 05:00; 187 01.01.2011 05:15; 189 01.01.2011 05:30; 191 01.01.2011 05:45; 188 01.01.2011 06:00; 187 01.01.2011 06:15; 188 01.01.2011 06:30; 186 01.01.2011 06:45; 187 01.01.2011 07:00; 189 01.01.2011 07:15; 191 01.01.2011 07:30; 191 01.01.2011 07:45; 191 01.01.2011 08:00; 194 01.01.2011 08:15; 198 01.01.2011 08:30; 198 01.01.2011 08:45; 196 01.01.2011 09:00; 200 01.01.2011 09:15; 204
3 Comments
dpb
on 10 Sep 2013
Keep discussion in the forum.
What we need is a short section of the file pasted and formatted precisely as it is in the external file. To get rid of the annoying word wrap in the response window, put two blanks in front of the first line--that's the "keyword" that is interpreted as Matlab code. Then you can make the preview window look like you want/need for it to.
There's no reason a csv file or a text file can't be read easily w/o any other machinations.
Answers (0)
This question is closed.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!