Message Boards Message Boards

1
|
12571 Views
|
5 Replies
|
4 Total Likes
View groups...
Share
Share this post:

Plot functions with Symbolic parameters

Hi,

In order to plot a simple function like sine we could use the following command
Plot[Sin[x],{x,0,10}]

the result of course is a sine wave of magnitude 1. The qustion is what if we want to plot the sine with amplitude other than 1 but we want to leave it in general like this:
Plot[A*Sin[x],{x,0,10}]
In other words, I am interested in seeing 'A' on the y-axis instead of the 1. I know it will not be as what I wrote in the second line. It might be related to the axis properties but I could not figure how to do it.

I need to plot this signal in this form because I am working on some tutoreials and notes for a signal processing course.

Regards
POSTED BY: Sadi Altamimi
5 Replies
Thanks dear Sam, this is exactely what I need. Many thanks for you Issac, your answer is very valuable. I appreciate your comments.

Regards.
POSTED BY: Sadi Altamimi
Considering Sam's input, and the sketch above, would the following work?
 T = 4;
 g[t_] := Sinc[T t];
 f[\[Omega]_] := FourierTransform[ g[t], t, \[Omega], FourierParameters -> {1,-1} ]
 plt0 = Plot[ g[t], {t, -2T, 2T},  AxesLabel -> {Automatic, "g(t)"},
                       PlotRange -> {{-2T, 2T},All} ,
                   PlotStyle -> {Thick, Red, Dashed}];
 
 
 plt1 = Plot[ f[\[Omega]], {\[Omega], -2T, 2T},  AxesLabel -> {Automatic,"F(\[Omega])"},
                            PlotRange -> {{-2T, 2T},All} ,
                        PlotStyle -> {Thick, Blue}];

Show[ {plt0,plt1},
        AxesLabel -> {"","g(t), F(\[Omega])"},
        (* Change Ticks to None to have no markers *)
        Ticks -> {Automatic, Automatic}]
POSTED BY: Isaac Abraham
If you are just interested in visual label, then this should work:
Plot[Sin[x], {x, 0, 10}, Ticks -> {Automatic, {{1, "HELLO"}}}]

POSTED BY: Sam Carrettie
Thanks Issac;

Consider this example, we have Pulse - Sinc fourier pair, and I am interested in showing the effect of the amplitude of the pules together with its width on the location of sinc's zeros .. in this case I need to put the symbol on the axis while hiding the actual numeric values from the axis because the actual values are not of that importance in this context.
POSTED BY: Sadi Altamimi
In order to plot, one would need a value for A. Will it be sufficient for you to use Manipulate wherein A takes on different values to show the effect of various A?
Manipulate[ Plot[A Sin[x], { x, 0, 10},
          (* Options 4 Plot *)
          PlotRange -> {Automatic, {-2, 2}} (* End Plot *)],
          {A, -2, 2, 1},
          (* Options 4 Manipulate *)
          ControlType -> RadioButton ]
Now you can click a radiobutton to show the effect of various A. I hope this may be helpful. 
POSTED BY: Isaac Abraham
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract