plot half Wave rectied sindus
조회 수: 3 (최근 30일)
이전 댓글 표시
V(t)=10*sin(8*pi*t). I have to write a script, which will plot rectified Voltage on time scale.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/793994/image.png)
error: __plt2vv__: vector lengths must match
t=0:0.01:1;
n=length(t);
j=10*sin(8*pi*t);
for i=1:1:n
if j>0
y(i)=j;
elseif j<0
y(i)=0;
end
end
plot(y,t)
댓글 수: 0
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!