Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 15th, 2012  |  syntax: None  |  size: 1.79 KB  |  hits: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Nsolve rantz not possible to plot
  2. ClearAll["Global`*"];
  3. cinv1 = 40;
  4. cinv2 = 4;
  5. cinv3 = 3;
  6. h2 = 1.4;
  7. h3 = 1.2;
  8. alpha = 0.04;
  9. z = 20;
  10. p = 0.06;
  11. cop1 = 0;
  12. cop2 = 1;
  13. cop3 = 1.5;
  14. l2 = 0.1;
  15. l3 = 0.17;
  16. teta2 = 0.19;
  17. teta3 = 0.1;
  18. co2 = -0.1;
  19.  
  20. smax = 40;
  21. c = 1;
  22.  
  23. Plot[Solve[{s12 == ((cinv1 -
  24.          cinv2) + ((cinv2 - cinv3)*((s12 teta2)/(
  25.           Sqrt[ (teta2 - teta3)] Sqrt[
  26.            c s12^2 teta2 - (2 alpha z)/c]))))/((1/(teta2 -
  27.            teta3))*((teta2*cop3 - teta3*cop2) + (teta2*h3*l3*E^(p*t) -
  28.             teta3*h2*l2*E^(p*t)))), s12 > 0}, s12, Reals], {t, 0, 10}]
  29.        
  30. "*Solve::ratnz: Solve was unable to solve the system with inexact coefficients. The answer was obtained by solving a corresponding exact system and numericizing the result*"
  31. "*Solve::ratnz: Solve was unable to solve the system with inexact coefficients. The answer was obtained by solving a corresponding exact system and numericizing the result*"
  32. "*Solve::ratnz: Solve was unable to solve the system with inexact coefficients. The answer was obtained by solving a corresponding exact system and numericizing the result*"
  33. *"General::stop: "Further output of !(*
  34. StyleBox[
  35. RowBox[{"Solve", "::", "ratnz"}], "MessageName"]) will be suppressed during this calculation""*
  36.        
  37. s2 = Solve[{s12 - ((cinv1 - cinv2) + ((cinv2 - cinv3) ((s12 teta2)/
  38.           (Sqrt[(teta2 - teta3)] Sqrt[c s12^2 teta2 - (2 alpha z)/c]))))/
  39.            ((1/(teta2 - teta3))*((teta2*cop3 - teta3*cop2) +
  40.            (teta2*h3*l3*E^(p*t) - teta3*h2*l2*E^(p*t))))} == 0, s12];
  41. Plot[s12 /. s2 , {t, 0, 59}]
  42.        
  43. f1a = s12 /. a;
  44.  
  45. f1 = Transpose[{b, f1a}];
  46.  
  47. ceiling1 = ListLinePlot[{f1},
  48. PlotRange -> {{0, 20}, {0, 40}},PlotStyle -> {Black, Dotted, Thickness[0.003]}];
  49.        
  50. curve1 = Interpolation[f1];
  51. intersec2a = FindRoot[curve1[x2] - t12[x2, l2], {x2, 0}];
  52. intersec2 = x2 /. intersec2a;