Convert graph figure to equation
조회 수: 12 (최근 30일)
이전 댓글 표시
I am trying to write the equation of the graph and plot it.
So far I have written this equation, however when I plot it, there is a point at (-3,-3) and I am not sure why. I need to plot it as a continuous time signal.
n = -6:6;
x = @(n) n.*((n>-4)&(n<=-2))+4*(n==-2)+(-2)*(n==2)+0*(n==4);
plot(n,x(n));
댓글 수: 1
Adam Danz
2023년 1월 20일
@collegestudent I edited your question to run your code so that it produces the plot.
채택된 답변
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!