Code to import csv file which contains text and numbers
이전 댓글 표시
Hey everyone,
in an assignment we have to work with a csv file that contains a table with text and numbers. The first row is just text, as it is the description for the columns. From the second row on, you have the data with which you have to work. There are some columns that contain text and other columns that contain numbers.
The file Looks like this:
Name (Col 1) II Country (Col 2) II School (Col 3) II Age in years (Col 4) II Tuition fee (Col5)
So far, I just worked with Excel files, which could be easily imported with the "data = importdata('filename.xlsx')" command. The Goal is to have a Code to automatically Import that file when i run the Code. At the Moment, to write the rest of the Code, I always have to Import the data manually.
Can anyone of you help me with an Import Code?
Thanks in advance for your help!
Best Florian
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Text Files에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!