I want arrays of one and two but this code doesn't do it
1 次查看(过去 30 天)
显示 更早的评论
回答(1 个)
KSSV
2022-10-13
u=[20,30,40];
one = zeros
Noise=10:5:40 ;
one = zeros(length(Noise),[]) ;
temp = zeros(length(Noise),[]) ;
time1 = zeros(length(Noise),[]) ;
for i = 1:length(Noise)
for n=1:1 %------------(2)
[best,fmin,time]=fpa(30,0.8,2000,dim,lb,ub,obj);
one(i,n)=fmin;
temp(i,n)=best;
time1(i,n)=time;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Swapping
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[~, ix] = sort(u);
[~, ix1(ix)] = sort(temp(nn,:));
two(i,:) = temp(nn,ix1);
end
end
save 3snSNR_Variable
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Multidimensional Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!