Fill a vector with two vectors
4 ビュー (過去 30 日間)
古いコメントを表示
Eva Maria Leal Munoz
2020 年 11 月 24 日
回答済み: Eva Maria Leal Munoz
2020 年 11 月 24 日
Hello, I have two vectors, Ex: V1 = [3 8 6 7 ] and V2= [1 5 9 4 ]. With V1 and V2, I would like to create the following vector: Result = [ 8 5 6 9 7 4]. How can I do this?
Thanks in advance,
Eva
0 件のコメント
採用された回答
その他の回答 (2 件)
Nora Khaled
2020 年 11 月 24 日
v1 = [3 8 6 7];
v2 = [1 5 9 4];
r=[];
for i=2:1:length(v1)
r=[r v1(i) v2(i)];
end
r
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Loops and Conditional Statements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!