遗传算法挑出复合TSP问题的遍历子代。 for i=1:INIT for j=(i+1):INIT if crossoverrate(i,j)<XRATE X1=gen(i,:); X2=gen(j,:); cross=ceil(7*rand(1)); X1=[X1(1:cross),X2(cross+1:8)]; X2=[X2(1:cross),X1(cross+1:8)]; gen(i,:)=X1; gen(j,:)=X2; end end ...展开收缩
基于神经网络技术 function main % This is a FNN trained by PSO and BP. After trained by PSO, the NN is trained by BP clc; clear all; MaxRunningTime=10; MaxHiddenLayerNode=10; %根据目标函数获得样本输入输出 rand('state',sum(100*clock));
选择三维点云的点,返回坐标: H = CLICKA3DPOINT(POINTCLOUD) shows a 3D point cloud and lets the user % select points by clicking on them. The selected point is highlighted % and its index in the point cloud will is printed on the screen. % POINTCLOUD should be a 3
多旅行商matlab实验源码实现了三种多旅行商问题 % MTSPOF_GA Fixed Open Multiple Traveling Salesmen Problem (M-TSP) Genetic Algorithm (GA) % Finds a (near) optimal solution to a variation of the "open" M-TSP by % setting up a GA to search for the shortest route (least dis
im = im2double(imread('C:\Users\air\Desktop\2.jpg')); M = size(im,1); h = fspecial('gaussian',5,1); imb = filter2(h,im)+rand(M,M)/10; figure; subplot(121); imshow(imb); subplot(122); imshow(im); Y = fft2(imb); H = fft2(h,M,M); invH = 1./H; idx = fin