Plot implicit function with the summation inside
11 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Peng Li
el 28 de Mzo. de 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 comentarios
Ver también
Categorías
Más información sobre Axis Labels en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!