Please find the attachement for the data .
I want an arbitrary number of events all occuring at the same time on different rows, matched up against each other arbitrarily.
For example :
t1 = timetable(hours([1;2;3;4;5]), {'A';'B';'C';'D';'E'});
t2 = timetable(hours([1;2;3]), [pi; sqrt(2);log2(eps)]);
t3 = timetable(hours([1;2;3;4]), [pi; sqrt(2);log2(eps);eps('single')]);
t4 = timetable(hours([1;2;3;4;5]), [pi; sqrt(2);log2(eps);eps('single');log2(eps('single'))]);
I want to generate a table that look's in below style.
Time Var1_t1 Var1_t2 Var1_t3 Var1_t4
____ _______ _______ __________ __________
1 hr 'A' 3.1416 3.1416 3.1416
2 hr 'B' 1.4142 1.4142 1.4142
3 hr 'C' -52 -52 -52
4 hr 'D' "" 1.1921e-07 1.1921e-07
5 hr 'E' "" "" -23
Please suggest an alogorithm which can do above requirement with the attached *.mat file.
Thanks!
2 Comments
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/480900-generate-table-with-an-arbitrary-number-of-events#comment_747176
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/480900-generate-table-with-an-arbitrary-number-of-events#comment_747176
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/480900-generate-table-with-an-arbitrary-number-of-events#comment_758336
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/480900-generate-table-with-an-arbitrary-number-of-events#comment_758336