Cell array of coordinates from two vectors
显示 更早的评论
I have two vectors, one with 119 X values and a one with 102 Y values. I'm trying to work out a way to combine these to create to all possible unique sets of coordinates (12,138 unique coordinates). I could use two nested for loops to do it, but it's very slow. I'm struggling to find if theres any combination of matlab functions that could achieve this.
采纳的回答
更多回答(1 个)
Raghunandan V
2018-10-5
you should you at least one nested loop
for k=1:length(X)
z=[X(k) Y'];
perms(Z);
end
类别
在 帮助中心 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!