calculating simple 2 equations with matlab. give me matlab code please~~

 採用された回答

KSSV
KSSV 2020 年 10 月 19 日

0 投票

That is pretty simple.....I will give some demo example..you have to extend it to your case.
Say got give f I want to find y = log(1/(sqrt(2)*pi*f))
f = 2 ;
y = log(1/(sqrt(2)*pi*f))

6 件のコメント

whiyan
whiyan 2020 年 10 月 19 日
yes but with my calculator answer and matlab answer are different.
Maybe some order was wrong. But still dont know what is correct.
Can you give some code?
KSSV
KSSV 2020 年 10 月 19 日
Show us your MATLAB code..so that we can correct you.
whiyan
whiyan 2020 年 10 月 19 日
f=20;
y=20*log(1/sqrt(1+(2*pi*f*(102*10^-9)*(985.1))^2)
i wrote the code for the first equation. Can you look over is it correct?
Alan Stevens
Alan Stevens 2020 年 10 月 19 日
Note that log in MATLAB is log to the base e. It's possible your calculator uses log to mean log to base 10.
John D'Errico
John D'Errico 2020 年 10 月 19 日
My bet? What is the difference between log, and log10? I know, just a factor of the natural log of 10.
But many times when someone writes log, they think they mean log to the base 10.
KSSV
KSSV 2020 年 10 月 19 日
You have missed a bracket in the lines which you have given.
f=20;
y=20*log(1/sqrt(1+(2*pi*f*102*10^-9*985.1)^2))

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeSymbolic Math Toolbox についてさらに検索

質問済み:

2020 年 10 月 19 日

コメント済み:

2020 年 10 月 19 日

Community Treasure Hunt

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

Start Hunting!

Translated by