How to create a Line Plot from gauge Data?

6 ビュー (過去 30 日間)
Elise Buller
Elise Buller 2022 年 2 月 28 日
コメント済み: Arif Hoq 2022 年 2 月 28 日
Hey! I am very new to Matlab so I apologise for the simple questions.
I am trying to create a simple line figure with Time on the x-axis and wave amplitude on the y-axis. My data is currently in a string variable and a table variable.
>>plot(RightHead2(:,1),RightHead2(:,2))
Unrecognized function or variable 'Plot'.
>> plot(RightHead(:,1),RightHead(:,2))
Error using plot
Not enough input arguments.
>> plot(RightHead2)
Error using plot
Invalid data argument.
Thank you!

回答 (1 件)

Arif Hoq
Arif Hoq 2022 年 2 月 28 日
編集済み: Arif Hoq 2022 年 2 月 28 日
try this:
time=table2array(RightHead2(2:end,1));
waveAmp=table2array(RightHead2(2:end,2));
plot(time,waveAmp)
or simply
waveAmp=table2array(RightHead2(2:end,2));
plot(waveAmp)
  7 件のコメント
Elise Buller
Elise Buller 2022 年 2 月 28 日
Thank you so much for your help Arif!
Arif Hoq
Arif Hoq 2022 年 2 月 28 日
my pleasure.

サインインしてコメントする。

カテゴリ

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

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by