Multiple graphs not showing

1 次查看(过去 30 天)
Samuel Suakye
Samuel Suakye 2020-4-2
% 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';

回答(1 个)

KALYAN ACHARJYA
KALYAN ACHARJYA 2020-4-2
编辑:KALYAN ACHARJYA 2020-4-2
All values produce the same result, hence opvelaped. When I multiply k by rand function it shows the plots.
  2 个评论
KALYAN ACHARJYA
KALYAN ACHARJYA 2020-4-2
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

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Graph and Network Algorithms 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by