I would like to use the join function to align timestrings, is this possible?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I keep getting an error message when I try to combine two 2 column matrices, one of these columns are timestrings and the other various temperatures. The error is
Undefined function 'join' for input arguments of type 'double'.
Error in Untitled (line 7) C = join(A,B)
The timestrings are occuring at a different frequency for the two matrices, does this effect things?
Thank you for your help
2 comentarios
CS Researcher
el 3 de Mayo de 2016
join is to merge two tables. How do A and B look? Can you share them?
Justin Berquist
el 4 de Mayo de 2016
Editada: Walter Roberson
el 4 de Mayo de 2016
Respuestas (1)
Walter Roberson
el 3 de Mayo de 2016
As CS Researcher indicates, join is for table object. You could convert your arrays to tables and join() those.
But remember that join is going to look for exact equality in entries, and if your timestamps are numeric there is a possibility that the the last bit or two of two seemingly equal timestamps might not match. If you are using R2014b or later, it would be better to read the data into tables directly using readtable, having it convert the external timestamps into datetime objects.
If you need interpolation between the two tables, that the entries are to be matched by "nearest" timestamp or something like that, then you need a different strategy, involving first deciding on the time stamps desired for the joined data, and then interpolating one or both arrays to the target timestamp and then combining the two.
2 comentarios
Ver también
Categorías
Más información sobre Characters and Strings 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!