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

4 ビュー (過去 30 日間)
SIMONET Aurelien
SIMONET Aurelien 2020 年 12 月 24 日
回答済み: Prudhvi Peddagoni 2020 年 12 月 28 日
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

回答 (1 件)

Prudhvi Peddagoni
Prudhvi Peddagoni 2020 年 12 月 28 日
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.

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by