How to plot signal continuously?

Hi, I have vector which length is 120798 and I want to plot it on graph continuously in time. For example, I want to have 15 seconds of signal on the plot all the time. Is there any way to do this?

回答 (1 件)

Birdman
Birdman 2018 年 6 月 5 日
編集済み: Birdman 2018 年 6 月 5 日

0 投票

Consider the following approach:
A=randi([1 5],1,120798); %this is demo data, you will use your own data instead of this
Tend=15; %you want to plot for 15 seconds
t=0:Tend/numel(A):Tend-(Tend/numel(A));
plot(t,A)
Hope this helps.

2 件のコメント

VK.
VK. 2018 年 6 月 5 日
Thanks for your answer. Can you tell me please what is 'val' in your code?
Birdman
Birdman 2018 年 6 月 5 日
Ups sorry, that should be Tend as well. My mistake. I edited it.

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

カテゴリ

ヘルプ センター および File Exchange2-D and 3-D Plots についてさらに検索

質問済み:

VK.
2018 年 6 月 5 日

編集済み:

2018 年 6 月 5 日

Community Treasure Hunt

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

Start Hunting!

Translated by