I would like to draw a graph with the import of the date in abscisse

4 views (last 30 days)
Hello everyone, I would like to draw a graph with abscisse the date. I have a file that is composed like this: column 1 line number, column 2 day, column 3 months, column 4 years, column 5 hours, column 6 minutes, column 7 seconds, column 8 point number, column 9 coordinates EST, column 10 coordinates North and column 11 coordinates altitude. I would already like to draw a graph with the GNSS1 number for example and the east coordinates according to the dates. And I don't know how to import the dates into Matlab

Answers (1)

Prudhvi Peddagoni
Prudhvi Peddagoni on 28 Dec 2020
Hi,
You can use import tool to import the data. Import it as a table. You can set the column names while importing.
You can extract the data from the table as follows.
indices=table.VarName8=='GNSS1' % getting the row numbers of the table with 8th column as 'GNSS1'
X=table.VarName1(indices); % extracting 1st column to a variable X
Y=table.VarName2(indices); % extracting 2nd column to a variable Y
You can use plot function to plot the data.
plot(X,Y); % plotting 2nd column data against the first column data
Hope this helps.

Categories

Find more on MATLAB in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!