Is it possible to plot several graphs with separate axis on the same figure? I want to compare different waveforms in one figure.

1 回表示 (過去 30 日間)
function g = graphData(file)
table = readtable(file); %read the data into a table
xr = table2array(table); %convert the table into an array(matrix)
x = xr(:,1);
y = xr(:,2);
[up,lo] = envelope(y); %attain the hilbert envelope
m = [up,lo];
M = find([up,lo] == max(m)); %find the max amplitude of the hilbert transform envelope
File_names = dir('*.csv'); %attain every waveform in the event folder
numFiles = length(File_names);
hold on
for i = 1:length(numFiles)
figure(i);
g = plot( x,y, x, up,'-p','MarkerIndices',(M),...
'MarkerFaceColor','blue',...
'MarkerSize',10 ); %plot time vs. amplitude vs. hilbert and mark max amplitude of hilbert
xlabel('time (seconds)');
ylabel('volts');
title("Peak in Hilbert Transform of Signal");
end
end

回答 (0 件)

カテゴリ

Help Center および File ExchangeHilbert and Walsh-Hadamard Transforms についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by