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.

how to write the code for te charging equation of a capacitor in matlab

Status
Not open for further replies.

pankaj jha

Full Member level 3
Joined
Apr 16, 2010
Messages
170
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Location
jaipur
Activity points
2,457
hello everyone
i am working on simulink.

i have a system where i sample my signal using sample and hold block from simulink library. Then i have to use a "Matlab Embedded" block from the "User defined" sublibrary.
The "Matlab Embedded" block should have the equation of charging a capacitor which charges during thr hold time of the sample and hold circuit.

i am trying to write the equation for charging of a capacitor.

Vo = Vin(nT)*(1-exp(-t/30)); for nT< t<(n+1)T.

where, the T=hold time for a sample and hold circuit.

I have to write this equation in matlab. Can anyone suggest me the code....
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top