# Can Mathematica Plot Functions with Undefined Parameters?

• LocationX
In summary, the person is asking if Mathematica can plot a graph of A Sin(\omega t - \pi / 2) with A and omega as variables and label the axes accordingly. They provide a code example using Ticks to adjust the axes and explain it further for clarity.
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}]

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

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

## 1. Why can't Mathematica plot this graph?

There could be several reasons why Mathematica is unable to plot a certain graph. Some possible reasons include: incorrect formatting of the graph, unsupported functions or expressions, or insufficient memory or computational power.

## 2. How can I fix the error "Mathematica cannot plot this graph"?

To fix this error, you can try adjusting the formatting of your graph, using different functions or expressions, or increasing the memory or computational resources available to Mathematica.

## 3. Is there a limit to the complexity of graphs that Mathematica can plot?

Yes, there is a limit to the complexity of graphs that Mathematica can plot. This limit depends on the memory and computational resources available to Mathematica, as well as the functions and expressions used in the graph.

## 4. Can I use third-party packages or extensions to help Mathematica plot more complex graphs?

Yes, there are several third-party packages and extensions that can expand the capabilities of Mathematica and allow it to plot more complex graphs. These can be found through the Mathematica website or community forums.

## 5. Are there any alternative software options for plotting graphs if Mathematica cannot handle it?

Yes, there are several alternative software options for plotting graphs if Mathematica cannot handle it. Some popular options include MATLAB, Maple, and Python with the Matplotlib library. It is always helpful to research and compare different software options to find the best fit for your needs.

Replies
6
Views
776
• Introductory Physics Homework Help
Replies
9
Views
269
• Programming and Computer Science
Replies
1
Views
1K
• MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
381
• MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
• Introductory Physics Homework Help
Replies
8
Views
819
• MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
• Introductory Physics Homework Help
Replies
4
Views
285
• Mechanics
Replies
10
Views
811
• Introductory Physics Homework Help
Replies
8
Views
437