Advertisement
garciahenry63

Untitled

Sep 28th, 2016
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. % Henry Garcia
  2. % EGMN 321
  3. % Prob 5.28
  4.  
  5. % Limits and Interval
  6. c = 12:0.1:16;
  7. u = 12;
  8. l = 16;
  9.  
  10. % Number of Iterations
  11. n = log(((16-12)/.0001)/log(2))
  12.  
  13. % Nearest Iteration
  14. I = nearest(n);
  15.  
  16. % Equation
  17. f = ((668.06./c)./(1-exp(-0.146843*c))-40);
  18.  
  19. %forif else
  20. for i = 0:1:I
  21. p = ((l+u)/2);
  22. if (f(p)*f(l) < 0)
  23. u = p;
  24. else
  25. l = p;
  26. end
  27. c = p
  28. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement