Plot an equation (sigma operator)
Afficher commentaires plus anciens
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')
Réponse acceptée
Plus de réponses (1)
Fatemeh Salar
le 2 Juil 2022
0 votes
1 commentaire
Star Strider
le 2 Juil 2022
As always, my pleasure!
Catégories
En savoir plus sur Mathematics dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
