How to combine two outputs of a into a single vector.
5 ビュー (過去 30 日間)
古いコメントを表示
L = randi([2,5]);
lo = [1,5,10]
hi = [3,8,9]
for k = 1:length(hi)
if hi(k(1:end))>lo(k(1:end))
a=[lo(k):hi(k)]
end
end
0 件のコメント
採用された回答
Star Strider
2020 年 3 月 11 日
I am not certain what result you want.
Try this:
L = randi([2,5]);
lo = [1,5,10];
hi = [3,8,9];
for k = 1:length(hi)
if hi(k(1:end))>lo(k(1:end))
a{k}=[lo(k):hi(k)];
end
end
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!