How to get data points from curve?

5 次查看(过去 30 天)
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

更多回答(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