could anyone help me to solve the issue
2 ビュー (過去 30 日間)
古いコメントを表示
A=[2.1 2.2 2.3 2.4 2.5 2.6]
B=[0.49 0.48 0.47 0.47 0.47 0.47]
I want to have the desired result
A=[2.1 2.2 2.3 2.3 2.3 2.3]
As B has the same values starting from third place, A needs to have the value 2.3 at the same third place and it should be continued until the end.
0 件のコメント
採用された回答
madhan ravi
2019 年 9 月 13 日
編集済み: madhan ravi
2019 年 9 月 13 日
[~,~,c] = unique(B,'stable');
A = A(c)
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Discrete Math についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!