Get the data points after smoothening the plot
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Krishna
le 12 Août 2022
Réponse apportée : Star Strider
le 12 Août 2022
I have 2 columns and 2388 rows.
I have plotted a graph with input column as y-axis and time as x-axis.
plot(table{3:2388,1}, {3:2388,2});
Then I smoothened the plot and obtained a graph as shown below.
smooth_curve = smoothdata(table{3:2388,2});
plot(table{3:2388,1}, smooth_curve);
How can I get the input(table{3:2388,2}) datapoints after smoothening the graph.
0 commentaires
Réponse acceptée
Star Strider
le 12 Août 2022
I am not certain what you are asking.
Try this —
T1 = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1096630/Untitled%20spreadsheet.xlsx')
% smooth_curve = smoothdata(T1{3:2388,2});
smooth_curve = smoothdata(T1.INPUT);
T1 = addvars(T1,smooth_curve) % Add 'smooth_curve' To 'T1'
VN = T1.Properties.VariableNames;
figure
plot(T1.TIME, T1.INPUT, 'DisplayName',VN{2})
hold on
plot(T1.TIME, T1.smooth_curve, 'DisplayName',strrep(VN{3},'_','\_')) % 'Escape' The Underline So It Prints Correctly In Tne 'legend'
hold off
legend('Location','best')
.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Discrete Data Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!