# Mathematica cannot plot this graph

1. Jan 24, 2009

### LocationX

General question regarding mathematica. I am trying to make a plot of $$A Sin(\omega t - \pi / 2)$$ but it seems that mathematica cannot plot this graph without having A and omega defined. Is there a way to have mathematica plot this given the variable A and frequency omega?

Basically, instead of plotting it on a number line, would mathematica be able to label the y axis in terms of A (instead of 1, 2, 3...) and also label the x axis with omega instead of pi, 2pi, .. etc.

Currently using:
Plot[A Sin[\[Omega] t - \[Pi]/2] , {t, 0, 6 Pi}]

2. Jan 25, 2009

### CompuChip

Re: Mathematica

What I usually do is fix some values for A and omega and adjust the axes accordingly. For example, try something like this

Code (Text):

y[t_] := A Sin[\[Omega] t - \[Pi]/2]
Block[{A = 1, \[Omega] = 2},
Plot[y[t], {t, 0, 10 \[Omega]},
Ticks -> {Table[{j \[Omega], j "\[Omega]"}, {j, 0, 10}],
Table[{k A, k "A"}, {k, -1, 1, 0.25}]}]
]

Note the use of Ticks, which puts different marks on the axes, and how I used Table to make precisely those marks that I want.

I hope the code is self-explanatory, otherwise I am counting on your questions :)