MATLAB Answers

0

illogical plotting and results in delayed function

Asked by Trulien Elmer on 10 Nov 2018
Latest activity Edited by Walter Roberson
on 10 Nov 2018
Here is the function im dealing with
clear;
syms x(t) X(w)
f1 = 2;
f2 = 3;
x(t) =cos(2*pi*f1*t)
subplot(2,1,1);
ezplot(x);
subplot(2,1,2);
ezplot(x(t-10));
And here are the results
how is this possible, even though there it is a delayed function?

  7 Comments

You expect the plots to be different. What is a specific t value at which you expect the two plots to have a different value, and what value are you expecting there for the two different plots ?
im not looking for a huge difference, all im looking for is a delayed cosine function by 10 units for every single time by using ezplot and syms function. isnt that what x(t-10) = cos(t) going to look like?
Delaying 4*pi*t by an integer t results in exactly the same value. cos 4*pi*t is periodic with a period of 1/2 so delaying it by 10 has no effect on the value.
Now if you were to take x(t-10.3) for example... Well, you would not be able to tell the difference compared to x(t-0.3) but it would be different than x(t)

Sign in to comment.

Tags

1 Answer

Answer by madhan ravi
on 10 Nov 2018

f1 = 2;
f2 = 3;
t=linspace(0,1,1000)
x=cos(2.*pi.*f1.*t)
x1=cos(2.*pi.*f2.*(t-10))
subplot(2,1,1);
plot(t,x);
subplot(2,1,2);
plot(t,x1);

  0 Comments

Sign in to comment.