Advertisement
Guest User

Untitled

a guest
Nov 14th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. >> %Yhtälöparin Ratkaisu Newtonin menetelmällä
  2. >>
  3. >> %Käyttää newtonin menetelmää ratkaise yhtälöpari
  4. >> %x^2 +2y^2 =30,
  5. >> %2x + y =4.
  6. >> %piirrä ensin kuva.
  7. >>
  8. >> x=-6:0.01:6;
  9. >> g1=sqrt((30-x.^2)/2);%y ratkaistuna ensimmäisestä yhtälöstä
  10. >> g2=-g1;
  11. >> g3=-2*x+4;%y ratkaistuna toisesta yhtälöstä.
  12. >> figure
  13. >> plot(x,g1,x,g2,x,g3)
  14.  
  15. Warning: Imaginary parts of complex X and/or Y arguments ignored
  16. >> grid
  17. >> %Kuvasta nähdään, että ratkaisut ovat likimain (0.4) ja (3.5,-3).
  18. >>
  19. >>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement