pankaj jha
Full Member level 3
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....
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....