Group Abstract Group Abstract

Message Boards Message Boards

0
|
2.9K Views
|
9 Replies
|
0 Total Likes
View groups...
Share
Share this post:

[?] Plot the following function and check if it is right?

Posted 7 years ago

I need to create a log-log plot of the following function:

f1=((v^2/(k - 3/2) + 1)^-k Gamma[k + 1] v^2)/(k Sqrt[(k - 3/2) \[Pi]]
  Gamma[k - 0.5])

The plot given by mathematica is:

and the plot given by matlab is:

What could be reason for this? Please see the code of mathematica

ClearAll["Global`*"]

 distFunckappa = ((v^2/(k - 3/2) + 1)^-k Gamma[k + 1] v^2)/(
 k Sqrt[(k - 3/2) \[Pi]] Gamma[k - 0.5])



 k = 2;

LogLogPlot[distFunckappa, {v, 0, 10}, 
 PlotStyle -> Directive[Blue, Thick], 
 AxesStyle -> Directive[Black, Bold, FontSize -> 14], 
 TicksStyle -> Directive[Black, Bold], AxesLabel -> {"v", "DNF"}, 
 Axes -> True]

and code in matlab is:

k=2;

v=0:0.1:10;

kappaDistFunc=(gamma(k+1)./(k.*gamma(k-1/2).*sqrt(k-3/2).*sqrt(pi))).*(1+(v.^2./(k-3/2))).^(-k).*v.^2;

loglog(kappaDistFunc)

Please help me Thanks in advance

Attachments:
POSTED BY: Harikrishnan A
9 Replies

Mathematica 10.2.

enter image description here

Mathematica 11.3.

enter image description here

POSTED BY: Mariusz Iwaniuk
Posted 7 years ago

See this: I have also done the same. What is the issue?? enter image description here

POSTED BY: Harikrishnan A

Probably a bug in LogLogPlot in Mathematica 11.0.0.

Try plot in Plot:

 Plot[(0.900316*v^2)/(1 + 2 v^2)^2, {v, 0, 10}]

And what Yours conclusions ?

POSTED BY: Mariusz Iwaniuk
Posted 7 years ago

Yes, the plot gives the correct answer. But I want to represent the data in log scale as loglog plot

POSTED BY: Harikrishnan A
POSTED BY: Mariusz Iwaniuk
Posted 7 years ago

Thank you, sir. This works correctly

POSTED BY: Harikrishnan A
Posted 7 years ago

My version of Mathematica is Mathematica 11.0. It gives me the first plot and matlab gives me the second plot and Matlab is correct. But people using Mathematica 11.3 is getting the same plot as matlab

POSTED BY: Harikrishnan A

Mathematica gives a correct answer. Execute yours matlab code, give the same form as Mathematica.

POSTED BY: Mariusz Iwaniuk
Posted 7 years ago

My version of Mathematica is Mathematica 11.0. It gives me the first plot and matlab gives me the second plot and Matlab is correct. But people using Mathematica 11.3 is getting the same plot as matlab

POSTED BY: Harikrishnan A
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard