I need to add and multiply a vetor
1 次查看(过去 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.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!