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.

Matlab problem! Please help...

Status
Not open for further replies.

Chest

Member level 3
Joined
Sep 18, 2006
Messages
67
Helped
2
Reputation
4
Reaction score
1
Trophy points
1,288
Activity points
1,756
I'm now writing a program to calculate the input resistance in Matlab code. But i'm faced some problem. May anyone can check it or correct it for me? The equations are
20_1166231843.JPG

Thanks in advance.

Maltlab codes that i writing (following parts is failure to running)

c=(ko*W/2).*cos(t);

F1 = inline('sin(c).^2.*sin(t).^3.*sin(t)./cos(t).^2');
I1 = quad(F1,0,pi);

I12=sum(sin(c).^2.*sin(t).^3.*sin(t)./cos(t).^2.*besselj(0,(ko*L).*sin(t)));
G1=I1./(120*pi^2);
G12=I12./(120*pi^2);
Rin0=(2.*(G1+G12))^-1;
 

it is obvious why you don't find the answere because F1 has two input variables: t and c but in quad you change only one varible from 0 to pi

I reccomend you calculate the integral by using "sum/ delta_t" there is no need to use inline or quad
 

    Chest

    Points: 2
    Helpful Answer Positive Rating
Hi, mdanaie:

It work well after I changing the integral by using "sum/ delta_t". Awesome. Thanks a lot.

Best Regards
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top