Troubleshooting Graph Plotting in Mathematica: K Value Error

  • Mathematica
  • Thread starter madness
  • Start date
  • Tags
    Mathematica
In summary, the individual is new to using Mathematica and is having trouble plotting a graph of f(x)=K(1-x)^{\frac{-3}{8}} with the given command. They have tried changing the value of K to 325, but the graph starts negative at x=0. They also tried downloading different software, but it didn't work. Another user suggests checking if the graph actually starts at (0,0) or (0,325) and provides a command to set the axes origin. This solves the problem and the individual is still getting used to using Mathematica.
  • #1
madness
815
70
I just got Mathematica last night and am trying to use it for the first time. I'm trying to plot a graph [tex] f(x)=K(1-x)^{\frac{-3}{8}} [/tex] but it's not working right. I tried first with K = 325 (for physical reasons) and the graph started negative at x=0. If I choose K to be almost anything other than 325 the graph starts at 0 which is also wrong. The command I gave was Plot[325(1-x)^(-3/8), {x,0,0.9}]. Did I do something wrong?
 
Physics news on Phys.org
  • #2
download the following software which is much more easier than mathematica
http://www.grapheeasy.com/download/ge2en.exe
 
Last edited by a moderator:
  • #3
Are you sure it starts at 0?
Or does it start at the crossing of the axes? Look carefully if the intersection point is indeed (0, 0), and not (0, 325).
If you insist on having it in the origin, usr

Code:
Plot[325(1-x)^(-3/8), {x,0,0.9}, AxesOrigin->{0, 0}]
 
  • #4
Thanks that solves the problem. I'm really new at this so I'm still trying to get used to it all.
 

1. What does the "K value error" mean in Mathematica?

The "K value error" in Mathematica refers to an error that occurs when trying to plot a graph using the Plot function. It occurs when the value of the "K" parameter, which represents the number of data points to use in the plot, is incorrect or missing.

2. How can I fix the "K value error" in Mathematica?

To fix the "K value error" in Mathematica, you can check the value of the "K" parameter and make sure it is set to a valid number. If the error persists, you can also try increasing the value of "K" to include more data points in the plot.

3. Why am I getting a "K value error" even though I have specified a value for "K" in my plot?

There are a few possible reasons for this. One possibility is that the value you have specified for "K" is not a valid number, such as a negative or non-numeric value. Another possibility is that the value of "K" is too large, causing an overflow error. You can try adjusting the value of "K" or using a different method for plotting your graph.

4. Can the "K value error" be caused by other factors besides the "K" parameter?

Yes, the "K value error" can be caused by other factors besides the "K" parameter. For example, it can also occur if the data being plotted is not in the correct format or if there are missing data points. It is important to check all aspects of your data and plot settings to identify the cause of the error.

5. Is there a way to prevent the "K value error" from occurring in Mathematica?

Yes, there are a few ways to prevent the "K value error" from occurring in Mathematica. One way is to make sure that the data being plotted is in the correct format and that there are no missing data points. Additionally, you can also try increasing the value of "K" or using a different method for plotting your graph, such as the ListPlot function.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
248
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
212
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
692
Back
Top