PinkP
PinkP

Reputation: 37

A wrong amplitude in a plotted signal using Matlab

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):

enter image description here

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

Answers (1)

Siddhesh
Siddhesh

Reputation: 482

It's correct. See the multiplying factor in the top left corner.

Upvotes: 2

Related Questions