余弦累加函数作图问题。

4 ビュー (過去 30 日間)
果博东方开户联系【微8785092】
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只有一个结果,图像是空的,是缺了循环吗?

採用された回答

果博东方注册开户【微8785092】
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 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!