余弦累加函数作图问题。
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
果博东方开户联系【微8785092】
le 23 Mai 2023
Réponse apportée : 果博东方注册开户【微8785092】
le 23 Mai 2023
a=-pi/4:pi/999:pi/4;
n=2:2:1000;
y1=0.3/sum((cos(n.*(pi/9))./((n.^2-1).^2))).*sum(cos(n.*(pi/9)).*cos(n.*a)./((n.^2-1).^2));
plot(a,y1);
这个求出来y1只有一个结果,图像是空的,是缺了循环吗?
0 commentaires
Réponse acceptée
果博东方注册开户【微8785092】
le 23 Mai 2023
a=-pi/4:pi/999:pi/4;
n=2:2:1000;
for ii = 1:length(a)
y1(ii)=0.3/sum((cos(n.*(pi/9))./((n.^2-1).^2))).*sum(cos(n.*(pi/9)).*cos(n.*a(ii))./((n.^2-1).^2));
end
plot(a,y1);
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Logical dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!