Advertisement
Guest User

Untitled

a guest
Aug 30th, 2015
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. clc
  2. clear variables
  3.  
  4. % EXEMPEL: POLYNOM
  5.  
  6. % Input-del: Polynom
  7.  
  8. a=0;
  9. b=-4;
  10. c=-10;
  11.  
  12. if a=0
  13.  
  14. a
  15.  
  16. elseif a~=0
  17.  
  18. P1=((-b/a)/2)+sqrt(((b/a)/2)^2-(c/a));
  19. P2=((-b/a)/2)-sqrt(((b/a)/2)^2-(c/a));
  20.  
  21.  
  22. % Ouput
  23.  
  24. P1
  25. P2
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement