Why the x-axis of the graph didnt follow the lentgh of the data?

1 回表示 (過去 30 日間)
Sabrina
Sabrina 2015 年 5 月 5 日
コメント済み: Sabrina 2015 年 5 月 5 日
Hi, Good day
I'm a new beginner for MATLAB.
why, when I'm plot the raw signal data,the x-axis make an extended plotted and left some space.
In my situation, the length of data is 12718, and the figure show, it's stop at 12718. But why, this figure plotted the x-axis until 14000, why not 12718.
There is an attachment figure (.jpg) as reference.
This is the code :
fs=100; raw=load('nazrulPPG.txt'); data=raw(1900:7900); L=length(data); t=0:(1/fs):60;
%figure (1) Original data subplot(311); plot(raw) subplot(312); plot(t,data);
Thank you for your cooperation
Best Regards Sabrina

採用された回答

Ilham Hardy
Ilham Hardy 2015 年 5 月 5 日
After your plot command, add this:
set(gca,'xlim',[0 L]);
  1 件のコメント
Sabrina
Sabrina 2015 年 5 月 5 日
Thanks Illham Hardy !
It's work on me.

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

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by