I need to add and multiply a vetor
조회 수: 2 (최근 30일)
이전 댓글 표시
채택된 답변
추가 답변 (1개)
Bora Eryilmaz
2022년 12월 13일
편집: Bora Eryilmaz
2022년 12월 13일
This looks like the dot product of the subvectors u(1:n-1) and u(2:end):
u = cos(0:pi/20:pi); % Create the vector
p = u(1:end-1) * u(2:end)' % Use the dot product.
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!