Multiple graphs not showing
1 view (last 30 days)
Show older comments
% A graph of alpha_xi=a vrs T (temperature)
% sigma(u)/sigmao = w = sigma(u)+ sigmapri(u)
% On 02-04-2020
% Let omega*tau = u; omega_E_xi*tau = v; eta = n
% epsilon_o - mu_o = p; tau = t
hFig = figure
clc;
v = 2.0;u = 2.0;
K = 8.617e-5;
trig = sin(4)*cos(4);
p = 2.7; t = 0.2; e = 1.6022e-19;
deltaxi = 0.0024; deltay = 0.0016;
n=[0.00 0.20 0.50 1.00];
T = linspace(0,700, 50); % However many you want.
delta1 = deltay./(K.*T); delta2 = deltaxi./(K.*T);
B0xi = besseli(0,delta2); B1xi = besseli(1, delta2);
B0y = besseli(0, delta1); B1y = besseli(1, delta1);
legendStrings = cell(length(n), 1);
for k1 = 1:length(n)
thisN = n(k1);
sigma = ((1i.*u-1-v.^2)./(v.^2-u.^2 +1-2i.*u)).*(1./(v.^2 +1));
sigmapri = thisN * ((1i.*u-1-v.^2)./((1+(thisN.*t)).^2 +v.^2).*(v.^2-u.^2 +1-2i.*u)).*(((B0y./B1y).*exp(0.9i.*pi))-(v./(v.^2 +1)));
w = sigma + sigmapri;
a = (w.*((K./e).*((p./(K.*T))-(delta1.*(B0y./B1y))+2-(delta2.*(B1xi./B0xi)))).*trig)./(w.*trig);
legendStrings{k1} = sprintf('n = %.2f', thisN);
plot(T, real(a), '.-', 'LineWidth', 2, 'MarkerSize', 15);
hold on;
drawnow;
end
grid on;
fontSize = 20;
xlabel('T(K)', 'FontSize', fontSize)
ylabel('\Re\alpha_\gamma', 'FontSize', fontSize)
title('\alpha_\gamma vs. Temp(K)', 'FontSize', fontSize)
legend(legendStrings, 'Location', 'northeast');
% Maximize the figure window.
hFig.WindowState = 'maximized';
0 Comments
Answers (1)
KALYAN ACHARJYA
on 2 Apr 2020
Edited: KALYAN ACHARJYA
on 2 Apr 2020
All values produce the same result, hence opvelaped. When I multiply k by rand function it shows the plots.
2 Comments
KALYAN ACHARJYA
on 2 Apr 2020
a = (w.*((K./e).*((p./(rand*K.*T))-(delta1.*(B0y./B1y))+2-(delta2.*(B1xi./B0xi)))).*trig)./(w.*trig);
%........................^
It generates any random number between 0 and 1 in each iteration. Just for verify
See Also
Categories
Find more on Graph and Network Algorithms 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!