I want arrays of one and two but this code doesn't do it

1 次查看(过去 30 天)
its deleted

回答(1 个)

KSSV
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

类别

Help CenterFile Exchange 中查找有关 Modeling 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by