Surface Plot in Sum Series
Show older comments
Hello, I've successfully express the Sum Series, but I have a small issue on implementing it surface plot.
I attempt I'm various methods, but always have the error: "Error using surf (line 71): Z must be a matrix, not a scalar or vector."
I would appreciate if anyone can figure out any small modifications on the surf plot.
h=2;
v=2;
l=2;
a = linspace(-5,5,100);
b = linspace(-5,5,100);
[x t]=meshgrid(a,b);
syms x t m
f = (8*h/pi^2)*(((-1)^(m-1))/((2*m-1)^2))*sin(((2*m-1)*pi*v*x)/l)*cos(((2*m-1)*pi*v*t)/l);
sum_f = symsum(f,m,1,Inf);
surf(x,t,sum_f);
Accepted Answer
More Answers (0)
Categories
Find more on Creating and Concatenating Matrices 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!
