Plot an equation (sigma operator)
Show older comments
Hi everyone,

I would like to plot this equation for x=[-2,2] and x=3, I wrote this code but it ain't working. Could you please tell me how can I make it work ? Thanks in advance.
clc
clear
close all
H=0
for x=-2:0.1:2;
n=3;
for k=0:floor(n/2);
H=H+((-1)^k)*factorial(n)*(x^(n-2*k))/(2^k*factorial(k)*factorial(n-2*k));
end
end
x=-2:0.1:2;
plot(x,H,'r')
Accepted Answer
More Answers (1)
Categories
Find more on Mathematics 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!