How can i normalize two plots having same R and Z coordinate to be exact or agree
2 views (last 30 days)
Show older comments
Hello, i have this data as attached that i rename as psi_n, R and Z. I also have an equation as i present in the code named psi_a, both psi_n and psi_a will have same R and Z coordinate. I want to normalize the two figures in one plot and to be exact or to agree but i could not get a good results. below is my code, please help me to check
mu=4*pi*10^-7;
Pm=0.43e12;
sigma=0.1;
psi0 = 0.49;
R0=1.05;
psit=0.4;
P2=(Pm*sigma)/(1+sigma);
d =(2*mu*P2)/psi0.^2;
h = 0.02;
lamda = pi/h;
psi_a = ((1./2.*(sqrt(d)).*(R.^2).*(real(exp((i.*(sqrt(d)).*R.^2)./2))))./(1./2.*(sqrt(d)).*(R0.^2).* ...
(real(exp((i.*(sqrt(d)).*R0.^2)./2)))).*cos(lamda.*Z./R0).*psi0*psit)-1./(2.*sigma);
% the normalized figures
figure
range_n = max(psi_n(:)) - min(psi_n(:));
n_psi = (psi_n - min(psi_n(:))) / range_n;
[C,h] = contour(R,Z,n_psi,10,'-.r','linewidth',2);
hold on
range_a = max(psi_a(:)) - min(psi_a(:));
a_psi = (psi_a - min(psi_a(:))) / range_a;
[C,h] = contour(R,Z,a_psi,10,'b','linewidth',2);
1 Comment
Sargondjani
on 23 Jun 2021
Please be precise on what you want, and where the problem in your code is. If you can't normalize multiple variables, then only give us the formulas for the normilization, and what is wrong about the result.
Answers (0)
See Also
Categories
Find more on Annotations 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!