Sum of the series with two variable
2 views (last 30 days)
Show older comments
Kemal Bey
on 19 Apr 2021
Commented: Abdalrahman Marshoud
on 9 May 2022
Given that
x=0:0.01:1;
t=0:0.001:0.1;
n is from 1 to 20 (not infinity)
How to make plot(x,u)? Please help!!!
2 Comments
the cyclist
on 19 Apr 2021
What help do you need? Are your familiar with at least the basics of MATLAB syntax and operations? If not, then I suggest you watch the free MATLAB Onramp tutorial.
If you are familiar with the basics, then I suggest you write out as much as you can yourself, and then post where you are stuck.
Accepted Answer
David Hill
on 19 Apr 2021
Edited: David Hill
on 20 Apr 2021
[x,t]=meshgrid(0:.01:1,0:.001:.1);
u=zeros(size(x));
for n=1:100
u=u+((-1)^n-1)/(n^2)*exp(-n^2*pi^2*t/10).*sin(n*pi*x);
end
u=u*4/(pi)^3;
surf(x,t,u);
2 Comments
More Answers (0)
See Also
Categories
Find more on Waveform Generation 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!