Matlab数组元素对比与统计问题。
数组如:A:10,11,12,13,26,2804,09,19,20,21,2601,07,10,23,28,3204,06,07,10,13,2504,06,15,17...
数组如:
A:
10,11,12,13,26,28
04,09,19,20,21,26
01,07,10,23,28,32
04,06,07,10,13,25
04,06,15,17,30,31
01,03,10,21,26,27
01,09,19,21,23,26
05,08,09,14,17,23
05,09,18,20,22,30
01,02,08,13,17,24
04,05,11,12,30,32
B:
02,12,16,17,27,30
08,13,17,21,23,32
03,05,07,08,21,31
04,11,19,25,26,32
11,17,28,30,31,33
05,08,18,23,25,31
05,16,19,20,25,28
04,08,12,13,16,33
07,10,25,26,27,32
14,15,18,25,26,30
02,07,11,12,14,32
01,10,20,22,26,31
02,07,15,17,22,30
01,05,11,13,14,27
08,13,15,26,29,31
统计B中每行元素与A中每行元素重复个数,若A中有X行与B中的第一行重复3个元素,则在B中第一行后加元素X,没有则加0。若A中有Y行与B中的第一行重复4个元素,则在B中第一行后加元素Y,依次类推......最后B数组变成10列。 展开
A:
10,11,12,13,26,28
04,09,19,20,21,26
01,07,10,23,28,32
04,06,07,10,13,25
04,06,15,17,30,31
01,03,10,21,26,27
01,09,19,21,23,26
05,08,09,14,17,23
05,09,18,20,22,30
01,02,08,13,17,24
04,05,11,12,30,32
B:
02,12,16,17,27,30
08,13,17,21,23,32
03,05,07,08,21,31
04,11,19,25,26,32
11,17,28,30,31,33
05,08,18,23,25,31
05,16,19,20,25,28
04,08,12,13,16,33
07,10,25,26,27,32
14,15,18,25,26,30
02,07,11,12,14,32
01,10,20,22,26,31
02,07,15,17,22,30
01,05,11,13,14,27
08,13,15,26,29,31
统计B中每行元素与A中每行元素重复个数,若A中有X行与B中的第一行重复3个元素,则在B中第一行后加元素X,没有则加0。若A中有Y行与B中的第一行重复4个元素,则在B中第一行后加元素Y,依次类推......最后B数组变成10列。 展开
展开全部
A=[10,11,12,13,26,28
04,09,19,20,21,26
01,07,10,23,28,32
04,06,07,10,13,25
04,06,15,17,30,31
01,03,10,21,26,27
01,09,19,21,23,26
05,08,09,14,17,23
05,09,18,20,22,30
01,02,08,13,17,24
04,05,11,12,30,32];
B=[02,12,16,17,27,30
08,13,17,21,23,32
03,05,07,08,21,31
04,11,19,25,26,32
11,17,28,30,31,33
05,08,18,23,25,31
05,16,19,20,25,28
04,08,12,13,16,33
07,10,25,26,27,32
14,15,18,25,26,30
02,07,11,12,14,32
01,10,20,22,26,31
02,07,15,17,22,30
01,05,11,13,14,27
08,13,15,26,29,31];
for j=1:length(B)
num3=0;
num4=0;
num5=0;
num6=0;
for i=1:length(A)
a=intersect(A(i,:),B(j,:));
if length(a)==3
num3=num3+1;
elseif length(a)==4
num4=num4+1;
elseif length(a)==5
num5=num5+1;
elseif length(a)==6
num6=num6+1;
end
end
B(j,7:10)=[num3 num4 num5 num6];
end
04,09,19,20,21,26
01,07,10,23,28,32
04,06,07,10,13,25
04,06,15,17,30,31
01,03,10,21,26,27
01,09,19,21,23,26
05,08,09,14,17,23
05,09,18,20,22,30
01,02,08,13,17,24
04,05,11,12,30,32];
B=[02,12,16,17,27,30
08,13,17,21,23,32
03,05,07,08,21,31
04,11,19,25,26,32
11,17,28,30,31,33
05,08,18,23,25,31
05,16,19,20,25,28
04,08,12,13,16,33
07,10,25,26,27,32
14,15,18,25,26,30
02,07,11,12,14,32
01,10,20,22,26,31
02,07,15,17,22,30
01,05,11,13,14,27
08,13,15,26,29,31];
for j=1:length(B)
num3=0;
num4=0;
num5=0;
num6=0;
for i=1:length(A)
a=intersect(A(i,:),B(j,:));
if length(a)==3
num3=num3+1;
elseif length(a)==4
num4=num4+1;
elseif length(a)==5
num5=num5+1;
elseif length(a)==6
num6=num6+1;
end
end
B(j,7:10)=[num3 num4 num5 num6];
end
Sievers分析仪
2024-10-13 广告
2024-10-13 广告
是的。传统上,对于符合要求的内毒素检测,最终用户必须从标准内毒素库存瓶中构建至少一式两份三点标准曲线;必须有重复的阴性控制;每个样品和PPC必须一式两份。有了Sievers Eclipse内毒素检测仪,这些步骤可以通过使用预嵌入的内毒素标准...
点击进入详情页
本回答由Sievers分析仪提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询