How to combine two outputs of a into a single vector.
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Pallav Patel
am 11 Mär. 2020
Kommentiert: Star Strider
am 11 Mär. 2020
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 Kommentare
Akzeptierte Antwort
Star Strider
am 11 Mär. 2020
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
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!