Combining multiple plots in 1 graph
显示 更早的评论
Hi, I would need some help in combining multiple plots in 1 graph please. i will need to combine 20 plots into one graph. However, these 20 plots has 20 seperate text file with different x & y axis, and i am facing difficulty in combining them together. are there any suggestions for me to combine them? i willl also need to combine them after wdenoise as well to see the difference. l had attached the 20 files please help me take a look please. currently i only know how to convert a individual file to a graph and the below are my codes.
filename = 't1-1.txt'
deliminator = ' ';
A = dlmread(filename, deliminator, 14, 0);
resistance = A(:,1);
reactance = A(:,2);
figure(1)
hold on
grid on
grid minor
plot (resistance, reactance, 'blue')
title ('Eddy Current Testing')
xlabel ('Resistance')
ylabel ('Reactance')
A1 = wdenoise(A,5, ...
'Wavelet', 'db5', ...
'DenoisingMethod', 'Bayes', ...
'ThresholdRule', 'Soft', ...
'NoiseEstimate', 'LevelIndependent');
figure(2)
plot(A1(:,1),A1(:,2));
xlabel('Resistance');
ylabel('Reactance');
title('denoised Signal');
1 个评论
Asif Karim
2019-12-26
Could you please clarify your requirement ?
- If you wish to plot all the 20 plots into a single figure window ,the
subplot()
function could help you.
- If you want to plot the 20 txt files as a single graph
Combining the text files into a single variable and plotting might help.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Power Converters 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!