필터 지우기
필터 지우기

How Do I Plotting in Time Domain?

조회 수: 13 (최근 30일)
Agus Arianto
Agus Arianto 2019년 9월 13일
편집: dpb 2019년 9월 13일
I have vibration data from the spur gears. Data is displayed in a .mat file. The first column is data from the accelerometer while the second column is data from the tachometer. Data is taken for 10 seconds with a sampling rate of 17066 Hz. Gear shaft frequency is 22.59 Hz. How can I plot 10 times the rotation of the shaft in a plot time domain with the x-axis in the second?

채택된 답변

dpb
dpb 2019년 9월 13일
편집: dpb 2019년 9월 13일
>> format bank
>> 10/22.59*17066
ans =
7554.67
>>
10 rev/22.59 rev/sec * 17066 samples/sec --> samples/10 revolutions
Oh. I did forget the second half of the Q?, sorry.
t=0:dt:(size(data,1)-1)*dt; % "data" is your array variable
xlim([0 0.5]) % pick desired subset to display
Above lets you plot the whole vector and pick what part to display--just use subscripting to find the pieces of interest as shown above if don't want the full time series plotted. If you wanted the first 10 revolutions, that would be
Npts=ceil(10/22.59*17066);
plot(t(1:Npts),data(1:Npts))
  댓글 수: 1
Agus Arianto
Agus Arianto 2019년 9월 13일
How to convert x-axis from 'sample' like above to x-axis like this ?Capture1.PNG

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Measurements and Spatial Audio에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by