Create a time table
Mostrar comentarios más antiguos
Hey guys, thanks in advance.
I have a program that reads samples from a hardware receiver. When it starts receiving I use:
dev.start();
fprintf('Start of LimeSDR\n');
tic;
start_time=datestr(now);
Then it receives this samples:
indRx1 = 1; % index of the last received sample
[samples1, ~, samplesLength1] = dev.receive(Fs*Ts,1);
bufferRx1(indRx1:indRx1+samplesLength1-1) = samples1;
pause(1)
tempo_rececao=toc;
stop_time=datestr(now);
and stops receiving:
% Cleanup and shutdown by stopping the RX stream and having MATLAB delete the handle object.
dev.stop();
clear dev;
fprintf('Stop of LimeSDR\n');
I want to create a timetable that has start time, stop time, Fs(frequency sampling), and samples1(number of samples).
I have done this
TT=array2timetable(samples1,'SampleRate',Fs,'StartTime',start_time);
But this only gives me a column with start time and the samples. How can I do this,
Thank you
2 comentarios
Eric Sofen
el 21 de Jun. de 2022
Timetable works with datetime and duration data types, but not datestr, so your start_time and stop_time should be:
start_time = datetime("now");
I'm unclear on your question. Do you want separate variables in the timetable for start_time and stop_time? What is the height of samples1? Are you ending up a one-row timetable in TT?
Miguel Albuquerque
el 21 de Jun. de 2022
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Tables en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!