Jan 5, 2011 #1 I Ichisuke Newbie level 4 Joined Dec 7, 2010 Messages 5 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,281 Activity points 1,308 I have a small project and don't know how to write and plot the following functions in MATLAB: f1(t) = tu(t) - tu(t-1) f2(t) = 10{e}^{-4t } Could someone lend me a hand here or send me a tutorial? Thanks.
I have a small project and don't know how to write and plot the following functions in MATLAB: f1(t) = tu(t) - tu(t-1) f2(t) = 10{e}^{-4t } Could someone lend me a hand here or send me a tutorial? Thanks.
Jan 5, 2011 #2 E eng Junior Member level 1 Joined Mar 10, 2003 Messages 16 Helped 2 Reputation 4 Reaction score 2 Trophy points 1,283 Activity points 194 Try the lecture notes here; **broken link removed**
Jan 5, 2011 #3 S sv1437 Full Member level 6 Joined Sep 5, 2008 Messages 349 Helped 103 Reputation 204 Reaction score 98 Trophy points 1,308 Location US Activity points 3,110 For the second function, f2(t) = 10{e}^{-4t }. Use the following code: First of all, you need to define the limits of the variable 't'. Like t goes from 0 to 1 or whatever your choice is. I took the limits for t from 0.1 to 2, with increments of 0.1 t=0.1:0.1:2; f=10*exp(-4*t); plot(t,f);
For the second function, f2(t) = 10{e}^{-4t }. Use the following code: First of all, you need to define the limits of the variable 't'. Like t goes from 0 to 1 or whatever your choice is. I took the limits for t from 0.1 to 2, with increments of 0.1 t=0.1:0.1:2; f=10*exp(-4*t); plot(t,f);
Jan 5, 2011 #4 I Ichisuke Newbie level 4 Joined Dec 7, 2010 Messages 5 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,281 Activity points 1,308 Thanks for your help! Very useful both replies.