From: awesome2999 jacob on 14 Apr 2010 10:28 Hi there, I am completely new to matlab and don't know how to draw a waveform of matlab code VT=0.0252; vin=1.5+cos(2*pi*100*t); R=2000; Is = 1/10000000000000000; t=linspace(0,0.03,1000); Vout=-VT*log(vin/R*Is); plot(t,Vout); i don't know how to get the right answer because the Vout should be around 0.72 to .76 sinewave form note: vin=1.5+cos(2*pi*100*t); means that peak value is 2.5 and lowest values is 0.5 which should be sub in Vout equations. please help me to get the right code thank-you for your help cheers
From: Greg Heath on 15 Apr 2010 05:53 On Apr 14, 10:28 am, "awesome2999 jacob" <samnz2...(a)yahoo.co.nz> wrote: > Hi there, > > I am completely new to matlab and don't know how to draw a waveform of > > matlab code > VT=0.0252; > vin=1.5+cos(2*pi*100*t); > R=2000; > Is = 1/10000000000000000; > t=linspace(0,0.03,1000); > Vout=-VT*log(vin/R*Is); > plot(t,Vout); > > i don't know how to get the right answer because the Vout should be around 0.72 to .76 > sinewave form > note: vin=1.5+cos(2*pi*100*t); means that peak value is 2.5 and lowest values is 0.5 > which should be sub in Vout equations. > > please help me to get the right code > thank-you for your help 1. What do the symbols VT, R and ls represent? 2. Why are you taking the log? 3. How can you define vin in terms of t before t is defined? Greg
|
Pages: 1 Prev: illustrator for matlab plots Next: index out of bounds because numel(y)=2. |