Message Boards Message Boards

0
|
10766 Views
|
10 Replies
|
4 Total Likes
View groups...
Share
Share this post:

Why don't the plot graph show fully in a single fuction ?

Posted 10 years ago
POSTED BY: ANH MONG
10 Replies
POSTED BY: Ulrich Mutze
Posted 10 years ago

That's exactly the answer for my second questions. Thanks Sir Mutze

POSTED BY: ANH MONG
Posted 10 years ago

And as to labels, you can try Epilog. Check this post out: http://stackoverflow.com/questions/7221315/how-do-i-label-different-curves-in-mathematica

POSTED BY: Maria R
Posted 10 years ago

Thanks Maria I need that one.

POSTED BY: ANH MONG
Posted 10 years ago

Hi!

It seems, the problem is, that you didn't define f2 while trying to plot the function. And when you manually substituted f2 by (1-f1) you got your plot. But you can also substitute it by a command:

Plot[With[{r1 = 0.055, r2 = 0.003}, F1 /. f2 -> 1 - f1], {f1, 0, 1}, 
 Frame -> True, FrameLabel -> {Subscript[f, 1], Subscript[F, 1]}]
POSTED BY: Maria R
Posted 10 years ago
POSTED BY: ANH MONG
Posted 10 years ago

As a function

 F[f1_, r1_, r2_] := ((1 - f1) f1 + f1^2 r1)/( 2 (1 - f1) f1 + f1^2 r1 + (1 - f1)^2 r2)
    Plot[{F[f1, 0.055, 0.003], F[f1, 55, 0.01], F[f1, 0.1, 10]}, {f1, 0, 1}, Frame -> True, FrameLabel -> {Subscript[f, 1], Subscript[F, 1]}]

Or, if you wish to keep both f1 and f2

FF[f1_, f2_, r1_, r2_] := (f1 f2 + r1 f1^2)/(r1 f1^2 + 2 f1 f2 + r2 f2^2)
Plot[{FF[f1, 1 - f1, 0.055, 0.003], FF[f1, 1 - f1, 55, 0.01], FF[f1, 1 - f1, 0.1, 10]}, {f1, 0, 1}, Frame -> True, FrameLabel -> {Subscript[f, 1], Subscript[F, 1]}]
POSTED BY: Maria R
Posted 10 years ago
POSTED BY: ANH MONG
Posted 10 years ago

I am not sure whether I understand you question correctly. Can the following code serve as you need?

Plot[{((1 - f1) f1 + 0.055 f1^2)/(0.003 (1 - f1)^2 + 2 (1 - f1) f1 + 
     0.055 f1^2), ((1 - f1) f1 + 55 f1^2)/(0.01 (1 - f1)^2 + 
     2 (1 - f1) f1 + 55 f1^2), ((1 - f1) f1 + 
     0.1 f1^2)/(10 (1 - f1)^2 + 2 (1 - f1) f1 + 0.1 f1^2), f1}, {f1, 
  0, 1}, Frame -> True, 
 FrameLabel -> {Subscript[f, 1], Subscript[F, 1]}, 
 PlotLegends -> "Expressions"]
POSTED BY: Yushi Wang
Posted 10 years ago

Thanks. My point is when I plotted with code Plot[ ((1 - f1) f1 + 0.055 f1^2)/(0.003 (1 - f1)^2 + 2 (1 - f1) f1 + 0.055 f1^2), {f1,0,1}] the F1, the vertical axis does not show me reaching to the value 1 at f1 =1. I want to know why it was not :)

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

Group Abstract Group Abstract