
How can I have multiple arrays as an input for my function?
3 次查看(过去 30 天)
显示 更早的评论
If P and Q was a 1x3 array, how could I make that as an input in my function as the square brackets do not work. Thanks
1 个评论
采纳的回答
Walter Roberson
2019-9-6
function SquaredDistance = PixelDistance(P, Q)
P1 = P(1); P2 = P(2); P3 = P(3);
Q1 = Q(1); Q2 = Q(2); Q3 = Q(3);
now calculate the distance
end
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!