Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Comparing correspodning elements from two different matrices with different dimensions

3 ビュー (過去 30 日間)
Shady Elsayed
Shady Elsayed 2020 年 5 月 21 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I have these two tables and I'm trying to look up the price of each ID from table A to add it to table B in order to calculate the discounted price, I've tried using vectorised codes but I'm struggling with the matrices dimensions as they aren't equal.
A=
ID Price
1 50
2 60
3 70
B=
CuID ID Discount
4 1 10
5 2 20
6 3 30
4 3 40
5 2 50
6 1 60
  1 件のコメント
Mohammad Sami
Mohammad Sami 2020 年 5 月 21 日
You want to use the ismember function to find the corresponding rows in A using the ID in B

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by