Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function result = isNumericScalar(x)
- if ~isscalar(x) | ~isnumeric(x)
- result = false;
- return;
- end
- result = true;
- end
- f = @(x) 1 / (1 + x ^ 2);
- fschlange = @(x) f - x;
- xstern = 0.6823278038280193273694;
- x0 = input('Startwert x₀ = ');
- if ~isNumericScalar(x0)
- error('Error: Ungültige Eingabe!');
- return;
- end
- n = input('Anzahl der Schritte n = ');
- if ~isNumericScalar(n)
- error('Error: Ungültige Eingabe!');
- return;
- end
- x0
- n
Advertisement
Add Comment
Please, Sign In to add comment