A Tool to track results of iterating multivariable complex functions

1 view (last 30 days)
Hello! I am doing work with iterating multivariable complex functions on the polydisk and thought it might help to be able to visualize the process. My plan was to generate a matrix of values by using a for loop to evaluate the function at the last coordinate, and then save the new coordinate in the next matrix entry, and then graphing the results I want by pulling consecutive terms out of the evaluation matrix.
I haven't done a lot with matlab in quite some time, and last time I used it I didn't do a whole lot of graphing. Ideally I'd like to be able to have a number of different plots, each one representing a different entry of the polydisk running in parallel so I can visualize each coordinate separately.
That's the idea. I have two questions; First, is there a better way to do this that I just don't know about? What I care about is the "end term behavior" of each coordinate of the function, so I don't necessarily need the short-term data (although having it wouldn't hurt), I just need the deep iterative data. Second I need a list of starting points. Ideally I'd like every hundredth of a point between -1 and 1 and between -i and i, which means something like 40,000 points in total. Is there an easy command to generate that list of complex values? I was thinking maybe something along the lines of the : operator in each dimension, but I didn't know if I can make 1 point by using two of those operators (I know I can make the real number list and then the imaginary number list, but I don't know if there's any nice way to combine the two to get all the complex numbers).
Thanks for the help.

Accepted Answer

Walter Roberson
Walter Roberson on 23 Nov 2015
coords = linspace(-1,1,200);
[P,Q] = ndgrid(coords,coords);
start_grid = complex(P,Q);
I do not understand about "deep iterative data", and I do not know what a "polydisk" is. I do not understand your visualization strategy as yet.
  1 Comment
Jason
Jason on 23 Nov 2015
Thanks for the Answer!
Sorry, to clarify I have a function that takes in, say 2 complex numbers, and gives out 2 complex numbers. I want to be able to watch each coordinate of the output separately as I iterate that function over and over.
As a concrete example, let's say I have a function f(w1, w2) = (w1*w2, w1-w2), where w1, w2 are complex numbers with -1 < real(w1) < 1 and -1 < imagine(w1) < 1 (same same for w2).
I would like to be able to make an animation of the function w1*w2 and the a separate animation (in tandem) of the function w1-w2 on a complex plane... but the rub is that this is iterating the function, so each updated frame would be the output of applying the function f to the previous output coordinates.
Thus in our example, if I stared with w1 = 1/2 and w2 = 1/2+i/2, then the first frame of the animation would be two graphs, one plotting the point (1/2)*(1/2 + i/2) = 1/4 + i/4, and the second graph plotting (1/2) - (1/2 + i/2) = i/2.
Then the second frame of the animation would take those output and reapply the function, so the first graph would plot (1/4 + i/4)(i/2) and the second graph would graph the point (i/2) - (1/4 + i/4) And so on and so on.
By deep iterative process I mean that the information I really want to see is say, iterations 20, 100, 1000, and 5000 lets say. (really, ideally I'd like an animation showing me every 50 or 100 iterations, or even take an input as to how many iterations to go before showing me the result).
That make sense?

Sign in to comment.

More Answers (0)

Categories

Find more on Graphics Performance in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!