jkhsjdhjs

Untitled

Nov 28th, 2017
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.49 KB | None | 0 0
  1. function result = isNumericScalar(x)
  2.     if ~isscalar(x) | ~isnumeric(x)
  3.         result = false;
  4.         return;
  5.     end
  6.     result = true;
  7. end
  8.  
  9. f = @(x) 1 / (1 + x ^ 2);
  10. fschlange = @(x) f - x;
  11.  
  12. xstern = 0.6823278038280193273694;
  13.  
  14. x0 = input('Startwert x₀ = ');
  15. if ~isNumericScalar(x0)
  16.     error('Error: Ungültige Eingabe!');
  17.     return;
  18. end
  19.  
  20. n = input('Anzahl der Schritte n = ');
  21. if ~isNumericScalar(n)
  22.     error('Error: Ungültige Eingabe!');
  23.     return;
  24. end
  25.  
  26. x0
  27. n
Advertisement
Add Comment
Please, Sign In to add comment