matlab找出两个矩阵不同的元素,两个矩阵MATLAB中的不同数组的大小比较

该博客介绍了如何在MATLAB中比较两个矩阵,查找具有相同ID但数值在特定范围之外的元素,并根据比例进行调整。通过示例数据展示了如何实现这个功能,包括计算中位数、确定需要乘除的元素并更新平均值。
摘要由CSDN通过智能技术生成

So here is my sample Data:

Arr StarP:

2141865 16

2141865 17

2141865 17

2141865 16

2141865 17

2141865 20

2141865 9

2141865 7

2141865 19

2141865 18

2141865 19

2141865 9

2141865 9

2141865 9

2141865 9

Arr medians:

2141865 16

The goal is to compare Arr StarP to Arr medians and find if any value with a corresponding ID (2141865) in Arr StarP is within a certain range of the value for that ID in Arr medians (if it is 1.5* larger or 1.5* smaller), and if it is not then it needs to be multiplied or divided by 1.5. If the value of Arr StarP is 2* larger or smaller than Arr medians then I want that value ignored in the new average calculation.

Example Output:

2141865 14.00666667

P.S. The real size of Arr B is 198x2 and Arr

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值