function of m and t solution plot

2 views (last 30 days)
N/A
N/A on 8 Dec 2020
Commented: N/A on 8 Dec 2020
hw question is below my work. please give recommendations for how to correct the code.
t=-5:0.01:5;
n=20;
m=1:n;
y=((t.^m)(m.^2)/((e.^mt)-e^(-mt));
hold on
plot(t,y)

Accepted Answer

David Hill
David Hill on 8 Dec 2020
t=-5:0.01:5;
n=20;
hold on;
for m=1:20
y=(t.^m)*m^2./(exp(m*t)-exp(-m*t));
plot(t,y)
end

More Answers (0)

Categories

Find more on Line Plots in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!