Plot implicit function with the summation inside
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello.
I'm trying to plot an implicit trancendental function with the summation inside the expression. Here my code:
function z=mu_ring
t=0.25;
G=0.0;
n=1:10000;
z1=@(w_c,mu) 1+w_c/pi*sum((-1).^n/n.*2*pi^2*n.*t./w_c*1./sinh(2*pi^2*n*t./w_c).*sin(2*pi*n*mu./w_c).*cos(pi*n).*exp(-2*pi*n.*G./w_c))-mu;
fimplicit(z1,[0.01 10 0 10],'MeshDensity',100,'LineWidth',3,'Color','red')
set(gca,'FontName','Times New Roman','FontSize',34)
xlabel('w_c','FontName','Times New Roman','fontsize',34,'fontweight','b');
ylabel('\mu','FontName','Times New Roman','fontsize',34,'fontweight','b');
grid on
end
After the execution I got a horizontal line with mu=1 instead something like that
Thank you in advance.
0 Kommentare
Antworten (1)
Peng Li
am 28 Mär. 2020
z1 = @(w_c, mu) 1 + w_c / pi ...
* sum((-1).^n / n .* 2 * pi^2 * n .* t ... % are you sure that the first / and the second to last * here correct or they should be ./ and .*?
./ w_c ...
* 1 ./ sinh(2 * pi^2 * n * t ./ w_c) ...
.* sin(2*pi*n*mu ./ w_c) ...
.* cos(pi*n) ...
.* exp(-2*pi*n.*G ./ w_c)) ...
- mu;
might be easier to read if you improve your style a bit.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Annotations finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!