Questions tagged [fixed-point-iteration]

Questions about fixed-point iteration, a method for calculating fixed points of functions. For combinators used to encode recursion, use [fixpoint-combinators] instead. For fixed-point arithmetic, use [fixed-point] instead. For the fixedpoint engine of Z3, use [z3-fixedpoint] instead.

A fixed point of a function f(x) is a value c such that f(c) = c. In words, a function takes its fixed points to themselves. Fixed points can be computed by an iterative algorithm. Various numerical analysis problems can be expressed in terms of obtaining fixed points, one example being Newton's method for obtaining roots of an equation (see the tag).

47 questions
1
vote
1 answer

solve equation using fixed point in scilab?

I have a equation f(x)=exp(x)+3x^2, f(x)=0, x=? then I use scilab to solve that equation using fixed point iteration this is my code function fixed_point(fung,x0,err) x=zeros(100); ea = 100; i = 1; x(i)=x0; printf(" \t i \t x(i) \t …
Zahi Azmi
  • 11
  • 5
1
vote
4 answers

Finding the fixed points of a function

I am trying to find the fixed point of a logistic distribution function and determine how the fixed point changes for different parameter values. The code looks like: nfxp.reps <- 0 err <- 10 p <- seq(0, 1, by = 0.0001) pold <- p gamma <- 6 k <-…
user1682980
  • 77
  • 1
  • 7
1
vote
1 answer

Ocaml fixed point implementation

I'm trying to figure out how to implement fixed point iteration in Ocaml. That is, given a function f and an x, I want to calculate what the final value of what f(f(f(x)...)) will be. So for example, if my function is x/2 and my x=50, my answer…
pauliwago
  • 6,373
  • 11
  • 42
  • 52
0
votes
0 answers

I want to creat a matrix in a loop that adds the new data each time to the same matrix

my code is this ` x0=input('Enter first guess (Must be grater than 0): '); e=input('Enter the desired telorance : '); n=input(['Enter the desired number of ' ... 'Iteration (Must be grater than 0): ']); for…
0
votes
2 answers

How to Make Python Print something at nth Iteration within a For Loop?

I want to preface my question by saying that I am very new to Python and have only started using it for a specific class in grad school. I have written a script to find the root of a function using iterative methods such as the Fixed-point,…
0
votes
1 answer

Questions conerning fixed point implementation of a moving window Newton-Raphson Method

Here is the reference post I am drawing upon: Any Faster RMS Value Calculation in C? #define INITIAL 512 /* Initial value of the filter memory. */ #define SAMPLES 512 uint16_t rms_filter(uint16_t sample) { static uint16_t rms = INITIAL; …
0
votes
1 answer

Fastest way to compute large amount of fixed points in python?

I have a large amount of one-dimensional nonlinear fixed point problems to solve, what is the most efficient numerical solver? I'm currently using scipy.optimize.fixed_point, it takes around 17s to run 1000 of my tasks. Thanks for any suggestions.
0
votes
0 answers

Fixed point recursion MATLAB

I am not sure if I have come across a trick question or not, but I am coding a fixed point recursion to find root for a given equation. To me, it seems like I have the answer right off the bat, but I am still trying to determine how to manipulate…
0
votes
1 answer

Horn clauses with multiplication in Z3

I've just started digging into Z3's fixed point solver and I've cooked up an example that hangs when using multiplication but completes when defining multiplication as a series of additions. As I'm new to working with Horn clauses, there could be…
Mike
  • 716
  • 4
  • 10
0
votes
3 answers

Finding the Fixed Points of an Iterative Map

I need to find fixed points of iterative map x[n] == 1/2 x[n-1]^2 - Mu. My approach: Subscript[g, n_ ][Mu_, x_] := Nest[0.5 * x^2 - Mu, x, n] fixedPoints[n_] := Solve[Subscript[g, n][Mu, x] == x, x] Plot[ Evaluate[{x, Table[Subscript[g,…
Sunday
  • 87
  • 2
  • 8
0
votes
1 answer

An OCaml function for finding fixed points

I have an OCaml function for finding fixed points: >> let rec fix f x = let x' = f x in if x = x' then x else fix f x';; (system message) val fix : ('a -> 'a) -> 'a -> 'a = The question is, I don't understand how it works when I…
JSong
  • 348
  • 3
  • 19
0
votes
0 answers

MATLAB - Fixed point iteration

I'm trying to figure out how to create a function for fixed point iteration. But I have been stuck on this for a good hour now and I am finally caving in. So what am I doing wrong? I would suspect that I'm updating wrong, but I am not really…
0
votes
2 answers

fixed point iteration algorithm

I am asked to write a program to solve this equation ( x^3 + x -1 = 0 ) using fixed point iteration. What is the algorithm for fixed point iteration? Is there any fixed point iteration code sample in Python? (not a function from any modules, but…
bbnn
  • 3,505
  • 10
  • 50
  • 68
0
votes
0 answers

MatLab fixed point method to find the root of a function as an input

I've trouble creating a code for finding roots of a function as an input by the fixed point method, Here I've done it using Newton-Raphson method: clc,close all syms x; fprintf('Newton Raphson\n'); Fun = input('\nType a function \n'); x0 =…
MarcoV
  • 1
  • 2
0
votes
1 answer

R fixed point of a function

I am looking for a fixed point x when f(x)=x of a function, ofcourse numerically, but I have no idea how to solve it with R, I am trying with fsolve with following code, but possibly its not the right way to write this...I am not getting…