How to store different results of for loop in same or different arrays, avoiding the overwriting of the results? (in MATLAB R2013b)
1 次查看(过去 30 天)
显示 更早的评论
A=[200 250 300 250];
Len(A)=length(A);
for k=1:1:(Len(A)-1)
T1=A(k);
T2=A(k+1);
end
j=1;
for i=1:1:L
if (T1<=Temp(i))&&(Temp(i)<=T2)
array(j,1)=i;
j=j+1;
end
end
L1=length(array);
for j=1:1:L1
a=array(j);
X(j,1)=P(a);
X(j,2)=Q(a);
X(j,3)=R(a);
X(j,4)=S(a);
X(j,5)=T(a);
end
0 个评论
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Whos 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!