2
|
113918 Views
|
12 Replies
|
4 Total Likes
View groups...
Share

# How to change Y axis range

Posted 12 years ago
 How can I change the Y axis range from 10^-3 to 10^0 with step size: 10^-1 to plot the following functionf = Product[ 1 - (Gamma[m, (m (((10 Log10[3]) *0.5)/S )^(1/n))/t] Gamma[ m, (m ((10 Log10[3]*0.75)/S)^(1/n))/t])/Gamma[m]^2, {i, 1, M}] /. Subscript -> Part;p = Plot[f, {S, 0, 20}, PlotRange -> {0,1}]Assuming that: m =1.64, n=2, M = 3 , t=1.57I used PlotRange but it does not work..Thanks for your support
12 Replies
Sort By:
Posted 12 years ago
 The graph has been plotted but I used Table option as follows: data2 = Table[{S, f}, {S, 0, 40}]G2 = ListLogPlot[data2, PlotRange -> {10^-4, 1}, Ticks -> {Automatic, ticks}, GridLines -> Automatic, Frame -> True]I think it's wrong way, but what about your openion?
Posted 12 years ago
 Is it possible to use RandomVariate for (S) for choosing random values?
Posted 12 years ago
 For which "S"? the global one, yes. Not Ok for the localized one in Plot.
Posted 12 years ago
 I have tried your command but it does not work, you can implement it with the given function: "dataList" is not recognized!!f = Product[ 1 - (Gamma[m, (m (((10 Log10[3]) *0.5)/S )^(1/n))/t] Gamma[ m, (m ((10 Log10[3]*0.75)/S)^(1/n))/t])/Gamma[m]^2, {i, 1, M}] /. Subscript -> Part;p = Plot[f, {S, 0, 20}, PlotRange -> {0,1}]m =1.64, n=2, M = 3 , t=1.57
Posted 12 years ago
 Did you repace with the actual data you have? You can put some numbers (~10) here for test
Posted 12 years ago
 Then you just need Show and ListLogPlot to complete this task in addition to your plot result p: Show[ListLogPlot[],LogPlot[func,range]]
Posted 12 years ago
 Yes, the scattered data (by simulation) vs smooth curve in the same graph. Thanks
Posted 12 years ago
 so you want to plot the scattered data and the smooth curver together?
Posted 12 years ago
 Mr.Yang,You are right!!, I have already plot the graph as below. Actually, I have another question if possible. I need to know how to plot the graph in Analytical (theoretical) versus Simulation (Empirical) result as illustarated in my original graph above. In fact, in Matlab, there is a tool box with Monte-Carlo option but I would like to know how we can achieve it in Mathematica. However, I have posted a question on your Forum before called "How To Plot The Outage Probability (F)", but I am still confused for the given answer!! and it's not the right way. I appreciate your support. Thanks a lot
Posted 12 years ago
 These lines will give you the result: ticks = {10^-4, 10^-3, 10^-2, 10^-1, 0};p = LogPlot[f, {S, 0, 20}, PlotRange -> {10^-4, 1},   Ticks -> {Automatic, ticks}, GridLines -> Automatic, Frame -> True]
Posted 12 years ago
 Hi, Mr.Yang,Yes, I need to change it like the below graph of Y axis scale...Thanks a lot for your cooperation
Posted 12 years ago
 Yahia, The PlotRange produces the correct result. Do you just want to change ticks?