Help debugging real time plotting issues
Ältere Kommentare anzeigen
I am plotting Raw EMG data in MATLAB. Here is the code I am using for plotting after creating time vector.
% Function to update the real-time plots
function updatePlots(t, data)
if isvalid(fig)
% Create time vectors
tData = (1:length(data)) / samplingRate; % Create a time vector for the raw data
% Plot raw data
addpoints(h1, tData , data);
% Set the X-axis limits based on the time window
xlim(ax1, [t - timeToEdit.Value / 1000, t]);
drawnow limitrate;
end
end
end
Why does the plot have lines connected to the first datapoint. How do I go about debugging this
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Arduino Hardware finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!