Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Integral Matlab(trapz)

Status
Not open for further replies.

harry456

Member level 1
Member level 1
Joined
Nov 13, 2012
Messages
39
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,545
I tried to calculate the Power of a the spectrum of a Continuous Wave (Pin=-10dB)
via Pf=10*log10(trapz((((Ufrequ/sqrt(2)).^2)./R)*10^3)) in Matlab and the result is -9.9476dB
but when I try to solve the integral via Pf=10*log10(trapz(f,(((Ufrequ/sqrt(2)).^2)./R)*10^3))
I get Pf = 3.0686e+000.
What is wrong with the second way resp. what wrong with way1?thanks
 

Hi Harry,

In the first one you are not giving a first argument (in the second you give "f"), and tghe function trapz assumes by default that the space is 1.
Surely the space between values in your "f" vector is 20. Right?
Regards

Z
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top