余弦累加函数作图问题。
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
果博东方开户联系【微8785092】
il 23 Mag 2023
Risposto: 果博东方注册开户【微8785092】
il 23 Mag 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 Commenti
Risposta accettata
果博东方注册开户【微8785092】
il 23 Mag 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 Commenti
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!