Difference between x = 0:0.1:2*pi and linspace(0,2*pi,0.1)
조회 수: 13 (최근 30일)
이전 댓글 표시
i was going through a matlab code and it had x = 0:0.1:2*pi written
i wanted to ask what is the difference between this and linspace and how it is used?
댓글 수: 0
채택된 답변
David Hill
2022년 11월 13일
Linspace divides the interval into the exact number specified, while colon notation just keeps increasing the interval by the middle number not to exceed the last number.
x=0:.1:2*pi
y=linspace(0,2*pi,63)
See the difference.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Animation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!