Borrar filtros
Borrar filtros

plotting two data sets with different number of data point against one time series x axis

8 visualizaciones (últimos 30 días)
I have two data sets
first data set consists of 86 400 elements because it is taken in every seconds
second data set is the same data set but taken in every minute therefore its number is less and equals to 1440
is there any way to plot those two data sets against one x axis which contains time corresponding to first data set
thank you in advance

Respuestas (1)

Voss
Voss el 5 de Feb. de 2022
% generate some random data for demonstration:
% second data:
data_1 = randn(86400,1)+(1:86400).'/40000;
% minute data:
data_2 = mean(reshape(data_1,60,[]),1).';
% pick a number between 0 and 60 to adjust how they line up:
second_offset = 30;
% plot:
figure();
plot(data_1);
hold on
plot((1:numel(data_2))*60-second_offset,data_2,'LineWidth',2);

Categorías

Más información sobre Graphics Object Identification 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!

Translated by