How do I plot a prod function in MATLAB?
조회 수: 1 (최근 30일)
이전 댓글 표시
My equation I am trying to do is 2*∏((t-5)/4), my graph is suppose to look like this:
I tried using the heaviside() but that didn't seem to work? This is the current code I have but nothing comes up?
This is the goal:

update: This is how far I got but can't seem to figure how to go down?
%This is the h(t)
t = 1:1:10;
ht = 2 * heaviside((t-5)/4);
plot(t, ht, 'b')
axis([0 10 0 4])
댓글 수: 0
채택된 답변
추가 답변 (1개)
Walter Roberson
2023년 3월 20일
syms t N
ht = 2 * symprod((t-5)/4, t, 1, N)
T = 1:10;
y = double(subs(ht, N, T))
plot(T, y)
참고 항목
카테고리
Help Center 및 File Exchange에서 Calculus에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!