Reputation: 37
I have plotted a signal in Matlab, but I have no idea why it is plotting it with a wrong amplitude. Here is the code:
%My signal: 𝒎(𝒕)=𝟎,𝟎𝟎𝟏∙𝒄𝒐𝒔(𝟎,𝟎𝟎𝟓∙𝝅∙𝒕+𝝅𝟒).
syms t;
A = 0.001; %Amplitude
T = 400; %Period
f = 0.0025; %Frequency
pi = 3.14;
%Plotting the signal
y = A*cos(0.005*pi*t+pi/4);
figure('Name','Signal y = A*cos(0.005*pi*t+pi/4)')
ezplot(y, [-T/2, T/2]);
title('y = A*cos(0.005*pi*t+pi/4)');
xlabel('Time'), ylabel('Amplitude');
grid on;
But I get a signal with a wrong value of amplitude (It plots with an amplitude of value 1 instead of 0.001):
I guess I am overlooking some mistake, but I still can't figure it out. Could you please give me a hint?
Upvotes: 0
Views: 38