Table row division in matlab

7 ビュー (過去 30 日間)
Anoop R
Anoop R 2020 年 11 月 4 日
コメント済み: Ameer Hamza 2020 年 11 月 4 日
I have read the values from my sensor with 10Hz frequency. That is
I have a table to 1 cloumn and 3000 rows all of data . I want to divide the Rows of the Table by 10 which my 10Hz sampling frequency.That is the row number starts from 0, 0.1 , 0.2...upto 3000 rows.
Alternatevily i have calculated my desired values using formaula(without dividing it by 10) the plot is as show below, but this plot range from 0 to 600, but since i have not divided it by 10. I want this same graph but x-axis should be from 0-60 in step of 0.1 but y-axis should remain the same. How can i achieve this . Any of the method is fine.
.

回答 (1 件)

Ameer Hamza
Ameer Hamza 2020 年 11 月 4 日
You can do it like this
data; % 3000x1 vector
t = 0:0.1:0.1*(numel(data)-1);
plot(t, y)
  2 件のコメント
Anoop R
Anoop R 2020 年 11 月 4 日
Thnaks, it works for Plot. But is there a method to direclty reduce it for all the row of the Data from Table.
Much appreciated .
Ameer Hamza
Ameer Hamza 2020 年 11 月 4 日
I didn't understand the question. Can you explain with example?

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

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by