Show older comments
我有一数组1×62维,,想用从第29列到62列的数据依次减去前28列数据,所得数据再和原来的前28列数据进行对比,找出所得的相同数据及其所在的列。所写程序的for循环只得到一个数据,不知道该怎么改?还有找出相同的数据部分的程序不太会写,请帮忙指导下~谢谢。
X=xlsread( '\F:\32samples\newdata\dataset_30');
x=X(3,:);
l=length(x);
for i=29:62
for j=1:28
y(i)=x(j)-x(i);
end
end
Answers (0)
Categories
Find more on 循环及条件语句 in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!