How to plot the log to base 10 of absolute value of a function containing Sigma (Σ) in 2D

7 vues (au cours des 30 derniers jours)
How can I achieve the 2D-plot with MATLAB?

Réponse acceptée

Micheal oguntola
Micheal oguntola le 22 Mai 2018
After many trials, I was able to write the code for the above question.
clear all
close all
Nt = 20;
L = 1;
a = 1;
t = 0:3/(Nt-1):3;
q = 0;
M = 100;
for n= 1:M
an = (2*n-1)/(2*L);
bn = an*pi;
cn = bn^2;
An = 2/(1+a*cn)^2;
xn = exp(-2*cn*t/(1+a*cn));
q = q + An.*xn;
end
P_eta_0 = log10(abs(q));
plot(t,P_eta_0)

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by