Advertisement
Guest User

lagrange plots

a guest
Mar 26th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. N=[1 10 100 1000 10000 100000 1000000];
  2.  
  3. x=log10(N);
  4.  
  5. p1=(x.^6-21*x.^5+175*x.^4-735*x.^3+1624*x.^2-1764*x+720)/720;
  6. plot(x,p1,'y','LineWidth',1.25)
  7.  
  8. hold on
  9.  
  10. p2=-(x.^6-20*x.^5+155*x.^4-580*x.^3+1044*x.^2-720*x)/120;
  11. plot(x,p2,'m','LineWidth',1.25)
  12.  
  13. p3=(x.^6-19*x.^5+137*x.^4-461*x.^3+702*x.^2-360*x)/48;
  14. plot(x,p3,'c','LineWidth',1.25)
  15.  
  16. p4=-(x.^6-18*x.^5+121*x.^4-372*x.^3+508*x.^2-240*x)/36;
  17. plot(x,p4,'r','LineWidth',1.25)
  18.  
  19. p5=(x.^6-17*x.^5+107*x.^4-307*x.^3+396*x.^2-180*x)/48;
  20. plot(x,p5,'g','LineWidth',1.25)
  21.  
  22. p6=-(x.^6-16*x.^5+95*x.^4-260*x.^3+324*x.^2-144*x)/120;
  23. plot(x,p6,'b','LineWidth',1.25)
  24.  
  25. p7=(x.^6-15*x.^5+85*x.^4-225*x.^3+274*x.^2-120*x)/720;
  26. plot(x,p7,'--k','LineWidth',1.25)
  27.  
  28. title('\phii(x) plots')
  29. xlabel('Number of stress cycles log10(N)')
  30. ylabel('\phii(x)')
  31. legend('\phi1(x)','\phi2(x)','\phi3(x)','\phi4(x)','\phi5(x)','\phi6(x)','\phi7(x)')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement