Plotting data from a .csv file

1.477 visualizzazioni (ultimi 30 giorni)
Win il 4 Dic 2013
Commentato: Anthony Sirico il 15 Giu 2020
Hi I need to plot a graph in MATLAB using data from a .csv file which has 2 columns of data, column A and column B. Can you please tell me the codes to use to do that? Thanks.
  1 Commento
Win il 4 Dic 2013
There is no comma in the file. Just two columns of data.

Accedi per commentare.

Risposta accettata

sixwwwwww il 4 Dic 2013
you can do it as follows:
col1 = Array(:, 1);
col2 = Array(:, 2);
plot(col1, col2)
  3 Commenti
Anthony Sirico
Anthony Sirico il 15 Giu 2020
Can i plot data froma CSV file with a column of Names?, i.e col1 = star names, col2 = distances.

Accedi per commentare.

Più risposte (1)

Muhammad Usman Saleem
Muhammad Usman Saleem il 23 Giu 2016


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by