MATLAB: How to store a signal along with time in the same matrix

matrixvariables

Hello, I want to know how can i store and present two variables in a single matrix. i have a ECG data file of 1×100000 and a time vector of same size. i want to present them in the same matrix. how can i do that? Also can i add other variables too to the matrix like comments etc. Thank you

Best Answer

Concatenate them vertically:
EKG_Record = [time; ECG];
This puts the time vector in row #1 and the electrocardiogram in row #2.