Azzera filtri
Azzera filtri

How to get data points from curve?

5 visualizzazioni (ultimi 30 giorni)
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

Risposta accettata

KSSV
KSSV il 22 Lug 2020
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

Più risposte (0)

Categorie

Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange

Prodotti


Release

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by