for循环语句。
이전 댓글 표시
我有一数组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
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 循环及条件语句에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!