calculating simple 2 equations with matlab. give me matlab code please~~
You are now following this question
- You will see updates in your followed content feed.
- You may receive emails, depending on your communication preferences.
An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Show older comments
0 votes
Accepted Answer
KSSV
on 19 Oct 2020
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 Comments
whiyan
on 19 Oct 2020
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
on 19 Oct 2020
Show us your MATLAB code..so that we can correct you.
whiyan
on 19 Oct 2020
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
on 19 Oct 2020
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
on 19 Oct 2020
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
on 19 Oct 2020
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))
More Answers (0)
Categories
Find more on Data Logging in Help Center and File Exchange
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
