PLOT LINEAR TREND, MEAN PLOT
Show older comments
Good Evening,
How can I graph the average value of the data indicated in the attached file, as well as its linear trend and simulated pressure and simulated trend, as indicated in the following graph

My code in attached file
clear;
clc;
%% data example 01
filename = 'example1'; %abrir archivo
T = readtable(filename) ;%ignore the warning about modified column names
x13202412 = T{:,1} + days(T{:,2}); %formato fecha y hora en dos columnas (1era y 2da columna)
y13202412 = T{:,3};%(datos tercera columna)
plot(x13202412,[y13202412],'r-','lineWidth',1)
hold on
%% data example 02
filename = 'example2'; %abrir archivo
T = readtable(filename) ;%ignore the warning about modified column names
x23202412 = T{:,1} + days(T{:,2}); %formato fecha y hora en dos columnas (1era y 2da columna)
y23202412 = T{:,3};%(datos tercera columna)
plot(x23202412,[y23202412],'r-','lineWidth',1)
hold on
%%
%figure('Name','Measured Data');
xlabel('time (hours)')
ylabel('pressure')
title('DATA')
legend({'-'},'Location','southeast');
grid on
grid minor
Accepted Answer
More Answers (0)
Categories
Find more on Spline Postprocessing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!