MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Having some trouble with plot and solve

  • To: mathgroup at smc.vnet.net
  • Subject: [mg115529] Re: Having some trouble with plot and solve
  • From: Alexei Boulbitch <alexei.boulbitch at iee.lu>
  • Date: Thu, 13 Jan 2011 03:29:51 -0500 (EST)

Hi,
you may go the following way. Copy the code below to the Input cell of your notebook and execute it.
Epsilon is the value you are looking for.

data = {{0, .005}, {100, .00465}, {200, .00432}, {400, .00374}, {600, \
.00323}, {900, .00260}, {1200, .00209}, {1500, .00168}};

(* Here the data is logarithmed and the new list contains the pairs (t, Log[c]): *)
Clear[g];
g[{x_, y_}] := {x, Log[y]};
dataLog = Map[g, data]

(* Here we fit the logarithmed data *)
ftLog = Fit[dataLog, {1, t}, t]
\[Epsilon] = Abs[ftLog[[2, 1]]]



(* The following 3 operations are only to visualize the result and get roughly an impression,
  if the fit we have found indeed fits. *)
lstLogPl =
   ListPlot[dataLog, PlotStyle ->  Red,
    AxesLabel ->  {Style["t", 16, Italic], Style["ln(c)", 16, Italic]}];

ftLogPl = Plot[ftLog, {t, 0, 1500}];

Show[{lstLogPl, ftLogPl}]

Have fun, Alexei


Hi i am new to mathematica, i have tried to combine this simple
problem of showing a Reaction speed but i cannot plot the tangent line
on a plot, and i don't seem to be able to have my regression in the
same notebook

data = {{0, .005}, {100, .00465}, {200, .00432}, {400, .00374}, {600,
\
.00323}, {900, .00260}, {1200, .00209}, {1500, .00168}};
N2O5 = Exp[Fit[data /. {x_, y_} ->  {x, Log[y]}, {1, x}, x]] //
   Simplify (*not in same notebook as the rest*)

f[x_] := 0.00499929 E^(-0.000726892 x) (*this works*)
g=B4[x_] := -3.63394*10^-6 E^(-0.000726892 x) (*this works*)

Plot[0.00499929 E^(-0.000726892 b), {b, 0, 4000},
  PlotRange ->  {0, .006}](*this works*)

Show[Plot[0.00499929 E^(-0.000726892 x), {x, -1000, 4000}],
  ListPlot[data, PlotRange ->  {0, .006}, PlotStyle ->  {Red}]] (*this
works*)

Manipulate[
  Solve[g=B4[x0]*{x - x0} + f[x0] == y], {x0, 0, 1500, 1, Appearance ->
"Labeled"}] (*this works*)

But i cannot combine it together, not even this small thing
Manipulate[
  Plot[y /. Solve[g\.b4[x0]*{x - x0} + f[x0] == y], {x0, 0, 1500, 1,
    Appearance ->  "Labeled"}], {x, 0, 4000}, PlotRange ->  {0, .006}]

Please help me, thanks

-- 
Alexei Boulbitch, Dr. habil.
Senior Scientist
Material Development

IEE S.A.
ZAE Weiergewan
11, rue Edmond Reuter
L-5326 CONTERN
Luxembourg

Tel: +352 2454 2566
Fax: +352 2454 3566
Mobile: +49 (0) 151 52 40 66 44

e-mail: alexei.boulbitch at iee.lu

www.iee.lu

--

This e-mail may contain trade secrets or privileged, undisclosed or
otherwise confidential information. If you are not the intended
recipient and have received this e-mail in error, you are hereby
notified that any review, copying or distribution of it is strictly
prohibited. Please inform us immediately and destroy the original
transmittal from your system. Thank you for your co-operation.



  • Prev by Date: Re: Parallelize & Functions That Remember Values They Have Found
  • Next by Date: Re: Parallelize & Functions That Remember Values They Have Found
  • Previous by thread: Re: Having some trouble with plot and solve
  • Next by thread: FittedModel Objects... How does Mathematica do it?