How to let 2 vector row to multiply by itself
2 次查看(过去 30 天)
显示 更早的评论
hi I want vector m to multiply with n but for some reason I got this
input(4,7)
i =
4 5 6 7
output =
16 25 36 49
this is my code
function output=input(m,n)
i=m:n
output=i.*i
end
6 个评论
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!