how can I plot this function?
이전 댓글 표시
My problem is how to plot this function

댓글 수: 5
KALYAN ACHARJYA
2022년 10월 26일
Pls refer here, helpful link
Niloufar
2022년 10월 26일
David Hill
2022년 10월 26일
Is it a function in f(x,r,t) or f(x,r) or f(r,t) or f(x,t) or f(x), f(r ) or f(t). What are the bounds or inputs for x, r, and t?
Niloufar
2022년 10월 27일
Niloufar
2022년 10월 27일
답변 (1개)
t = linspace(-5,5,1000);
N = 1000;n=1:N;
an = (100*n*pi.*(-1).^(n+1).*(1000-121*n.^2*pi^2))/(((1000-121*n.^2*pi^2).^2 + (1320*n*pi).^2).*(50*n*pi));
bn = (100*n*pi.*(-1).^(n+1).*(1320*n*pi))./(((1000-121*n.^2*pi^2).^2 + (1320*n*pi).^2).*(50*n*pi));
f = @(t)sum(an.*cos(100*n*pi*t) + bn.*sin(100*n*pi*t));
for k=1:length(t)
F(k)=f(t(k));
end
plot(t,F)
카테고리
도움말 센터 및 File Exchange에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
