Please someone help me correct my code. I want to plot a 2D graph for distinct alpha in one single 2D plot. See the attached photo for the guidience
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Omorodion Solomon
am 19 Sep. 2021
Kommentiert: Walter Roberson
am 20 Sep. 2021
alpha=[0.7, 0.8,0.9,1];
P=1;
t=0.5;
s=[-5:0.2:5];
A=(1-s.^2)+((P-4).*(t.^alpha))./(gamma(alpha+1));
Plot(s,A,'-r');
xlabel('x')
ylabel('u')
legend()


0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 19 Sep. 2021
alpha=[0.7, 0.8,0.9,1];
P=1;
t=0.5;
s = (-5:0.2:5).';
A=(1-s.^2)+((P-4).*(t.^alpha))./(gamma(alpha+1));
plot(s,A);
xlabel('x')
ylabel('u')
legend( "\alpha = " + alpha)
0 Kommentare
Weitere Antworten (1)
Omorodion Solomon
am 20 Sep. 2021
1 Kommentar
Walter Roberson
am 20 Sep. 2021
For finite cases:
m = (1:2:2*n-3).';
urt = r + sum(prod(m.^2)./r.^(2*n-1) .* t.^(alpha .* n) ./ gamma(alpha .* n + 1),1)
for infinite upper bound you would need to use symsum() and symprod()
Siehe auch
Kategorien
Mehr zu 2-D and 3-D Plots 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!