How to convert logarithmic to linear
44 ビュー (過去 30 日間)
古いコメントを表示
I use rfplot to plot magnitude of s-parameters in db, if i want to plot the s.parameters in linear form how can i do this ?
s=sparameters("C:\Users\Moza Salem Mohamed\OneDrive\Desktop\MM\Lab 2\emptyCell.s2p")
figure
rfplot(s,1,1)
hold on
rfplot(s,2,1)
title("Empty Cavity (Log)")
hold off
0 件のコメント
回答 (3 件)
Mark
2024 年 5 月 29 日
The default rfplot format is "db", but it also supports "abs", "angle", "real", and "imag".
For example, rfplot(s,1,1,"abs").
0 件のコメント
Star Strider
2021 年 9 月 20 日
If you do not have it:
dB2mag = @(dB) 10.^(dB/20); % Note: Capital 'B'
mag = 100;
dB = mag2db(mag)
mag = dB2mag(dB)
Since MATLAB is case-sensitive, the ‘dB2mag’ anonymous function will not overshadow any of the db2mag functions in the Toolboxes. (The exp function will not work in this instance, since decibels are defined in terms of base-10 logarithms.)
.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Analog Filters についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!