How to plot the function f(1/z) in matlab where z is any complex number where te coefficients evolve with time t

1 view (last 30 days)
I am trying to plot the functions f(z) and f(1/z) where z is complex numper and the coefficients of both functions evolve with time t, also there is a relationship between these two functions such that the coeffivients of f(1/z) are the complex conjugates of the coefficients of f(z) multibly in some constant
1- I use p=[(0.9-0.124i) (0.4243 + 0.0017i) (0.10 + 0.3i)]; and as t change time = 0:0.01:2*pi (polynomial in z inthe second degree) f(z) = (0.10 + 0.3i) + (0.4243 + 0.0017i)z + (0.9-0.124i)z^2
the coefficients of p will change with time by using this relation | f(t)> =exp(i t H)|f(0)>,for some H (given) and |f(0)> are the coefficients of p at t=o, and at every time I have new coefficients | f(t)> and plot the function p.
2- the function f(1/z) at every time must use the complex conjugate of the coeffecients of p (multiply in some constants)which also change with time t by the same way that coefficients of p do(in this case f(1/z) is the function of 1/z in the third degree) f(1/z) = (0.10 0.3i)z^-1 + (0.2121 0.0008i)z^−2 + (0.9 + 0.001i)z^−3.
How can I plot the two function in this case?
When I am trying to plot f(z) and f(1/z) I got paths in complex plane (not serface). and I am not sure that plots are correct.
This is the code which I have used,
%%%%%%%%%%%%%%%%
%%%%%%%%%%%%
for k1 = 1:numel(time) % the for look for time
Time(k1).AtThatTime = k1; % in Time variable you will see how many iteration. in this example the time move with 0.2 which
Time(k1).f(:,:) = expm(i*H*time(k1))*f0; % this is your function and all the results are stored in Time variable in variable f
Time(k1).Abs = abs(Time(k1).f(1))^2+abs(Time(k1).f(2))^2+abs(Time(k1).f(3))^2; % I calculate the abs for each result to be sure that it = 1
p = [Time(k1).f(3) sqrt(2)*(Time(k1).f(2)) (Time(k1).f(1))]; %the coefficion of varry on time
plot(p,'*r','linewidth',2,'markersize',4); % here i want to plot f(z);
% I am trying to plot f(1/z)
z=2+3i
p1= polyval(p,1./z);
plot(p1,'*k','linewidth',1,'markersize',4),
hold on;
grid on
% %legend({'r1','r2'},'Location','northEast','NumColumns',2) % display the key of the graph
end
xlabel ('Z_R')
ylabel('Z_I')
grid on
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%
This way worked with me to plot the roots of p (they were graphs in complex plane), but does not work in the case of ploting f(z) and f(1/z).
I will appreciate any help

Answers (0)

Categories

Find more on 2-D and 3-D Plots 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!