I have one table with all hourly time in column 1 and I want to join multiple tables to this table, however each joining table has data on an intermitant hourly basis over many years

1 Ansicht (letzte 30 Tage)
%Calendar table is simply all hours of each day for a period equal to the start of both Data 1 and 2 however calandar is longer than either data 1 or 2
**Calandar Table = Cal**
%Data one/two have data with values not every hour but on most days, however they may or maynot have values on the same hour. The first column of both have time values for each row, therefore this will be the joining key.
Data table one = Dat1
Data table two = Dat2
%I want to join Dat1 to Cal and if there is no data for the columns of Dat1 for a row of Cal then each column of Dat1 will have a NaN for that row.
%I want to join Dat2 to Cal (which already has Dat1 joined to it) and if there is no data for the columns of Dat2 for a row of Cal then each column of Dat2 will have a NaN for that row.
%I essentially want to bring all my data into one table so that I can look at each hour and see all the values for that hour. I also need to know hours where there was no data as this is very important. Both Dat1 and Dat2 are at least 1000 columns wide.
%I have tried to inner and outer join however that has not worked
% I would like help to bring all this data into one table that has all time values as I need to then join data 3 and 4 which have many columns of data every hour

Antworten (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by