필터 지우기
필터 지우기

How to get data points from curve?

조회 수: 5 (최근 30일)
PRABAKARAN ARUMUGAM
PRABAKARAN ARUMUGAM 2020년 7월 22일
댓글: PRABAKARAN ARUMUGAM 2020년 7월 22일
Hi,
I am having the velocity data collected every 6 hours interval for 22 days. It is like a linear plot. How to smooth the curve and estimate 24 hours value for 22 days. The hourly values are with in the maximum and minimum interval of the day and follows the curve pattern. Day one data starts form 1:5 and so on.
Please help me to get the data points for every hour in that curve.
Please find the attached file column 2 is velocity. column one is x value please igonore that

채택된 답변

KSSV
KSSV 2020년 7월 22일
data = importdata("Maxminpoints.txt") ;
t = data(:,1) ; y = data(:,2) ;
nt = 22*24 ; % number of points if every hour taken for 22 days
ti = linspace(min(t),max(t),nt) ; % make time
yi = spline(t,y,ti) ; % interpolate
Y = reshape(yi,24,[]) ; % reshape to each day
Y_mean = mean(Y) ; % get average value of each day/ 24 hours
  댓글 수: 1
PRABAKARAN ARUMUGAM
PRABAKARAN ARUMUGAM 2020년 7월 22일
Thank you very much KSSV, That's really helpful.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by