How to plot several curves on the same figure plot with the same StartTime
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hi guys,
again a small problem. I would like to plot several curves in one figure, but beecause it's a time series, I get a plot where the curves are behind each other.
I saw in one tutrial, that it's possible to set the StartTime to zero for both curves, but I can't find it anymore. Could you please help me?
% Read tables
C1 = readtable('Curve1.xlsx');
C2 = readtable('Curve2.xlsx');
% Convert to timetable
TTC1 = table2timetable(C1);
TTC2 = table2timetable(C2);
% Interpolate
dt = milliseconds(100);
IC1 = retime(TTC1,'regular','linear','TimeStep', dt);
IC2 = retime(TTC2,'regular','linear','TimeStep', dt);
% Plot
plot(IC1.Time, IC1.Volt);
hold on;
plot(IC2.Time, IC2.Volt);
Thanks a lot.
0 comentarios
Respuesta aceptada
Más respuestas (1)
Ver también
Categorías
Más información sobre Surface and Mesh Plots 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!