MATLAB Answers

Translated by

このページのコンテンツは英語から自動翻訳されています。自動翻訳をオフにする場合は「<a class="turn_off_mt" href="#" onclick="window._kiq.push(['set', { 'event': 'Turn off MT' }]);">ここ</a>」をクリックしてください。

0

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

Timothy Nsubuga さんによって質問されました 2019 年 6 月 19 日 1:49
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 件のコメント

サインイン to comment.

0 件の回答


Translated by