Mathematica cannot plot this graph

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.
  • #1
LocationX
147
0
General question regarding mathematica. I am trying to make a plot of [tex] A Sin(\omega t - \pi / 2) [/tex] 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}]
 
Physics news on Phys.org
  • #2


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.

Similar threads

  • Advanced Physics Homework Help
Replies
6
Views
629
  • Programming and Computer Science
Replies
1
Views
1K
  • Introductory Physics Homework Help
Replies
8
Views
574
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
0
Views
513
  • Advanced Physics Homework Help
Replies
7
Views
1K
  • General Math
Replies
2
Views
726
Replies
2
Views
1K
Replies
5
Views
362
  • Introductory Physics Homework Help
Replies
17
Views
379
Back
Top