필터 지우기
필터 지우기

I am trying to plot this

조회 수: 4 (최근 30일)
Ye
Ye 2022년 11월 1일
답변: Star Strider 2022년 11월 1일
How do i code and plot using odd harmonic of fundamental frequencies??

답변 (1개)

Star Strider
Star Strider 2022년 11월 1일
Try this —
t = linspace(0, 2*pi, 1E3); % Time Vector
x = 1:2:31; % Terms Vector
f = 2; % Frequency
s = sum(sin(x(:)*t*f)./x(:)); % Signal
figure
plot(t,s)
grid
xlabel('t')
ylabel('s')
xlim([min(t) max(t)])
I will let you figure out how it works.
.

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by