How to plot absorption of sound waves in seawater and boric acid?
1 view (last 30 days)
Show older comments
Please provide a Matlab code for the figure below.
0 Comments
Accepted Answer
Stephan
on 6 Oct 2019
% Produce some data
x = logspace(-1,2);
y1 = exp(x);
y2 = (exp(x)./exp(y1));
% Plot lo double log-scale
loglog(x,y1,'--k','LineWidth',2)
hold on
loglog(x,y2,'-k','LineWidth',2)
hold off
% Change look
a = gca;
grid on
xlabel('Frquency - kHz')
ylabel('Attenuation - dB/km')
legend({'Saltwater', 'MgSO_{4}'}, 'Interpreter', 'tex', 'Location', 'southeast')
a.GridLineStyle = '--';
a.MinorGridLineStyle = '--';
a.GridColor = 'k';
a.MinorGridColor = 'k';
a.GridAlpha = 1;
a.MinorGridAlpha = 1;
6 Comments
More Answers (0)
See Also
Categories
Find more on Continuous Waveforms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!