Get the data points after smoothening the plot
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Krishna
el 12 de Ag. de 2022
Respondida: Star Strider
el 12 de Ag. de 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 comentarios
Respuesta aceptada
Star Strider
el 12 de Ag. de 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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Directed Graphs en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!