I need a function or boucle
7 次查看(过去 30 天)
显示 更早的评论
Hello everyone,
I need a function or boucle to do
ex:
X1 X2 X3 X4 X5 X6 X7 X8 X9 X10
X2 X3 X4 X5 X6 X7 X8 X9 X10 X1
X1 X3 X4 X5 X6 X7 X8 X9 X10 X2
X1 X2 X4 X5 X6 X7 X8 X9 X10 X3
....
.
.
thnks
3 个评论
Image Analyst
2022-4-5
I had to look it up, so I'm assuming others (not in the knitting world) don't know what boucle is, so here's the definition:
Definition of bouclé
1 : an uneven yarn of three plies one of which forms loops at intervals
2 : a fabric of bouclé yarn
采纳的回答
Voss
2022-4-5
X = 1:10;
M = [];
idx = 1:numel(X);
for ii = idx([end 1:end-1])
M = [M; X(idx ~= ii) X(ii)];
end
disp(M);
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!