www.dftb.net > %%%%%%%%%%%%%%%%%%%%%%% 求mAtlAB高手给我把这个...

%%%%%%%%%%%%%%%%%%%%%%% 求mAtlAB高手给我把这个...

这个是注解

两个都是求最小值 %%%%%%%%%%%%求 ObjEmp 最小值(第一个出现的位置) %%%% end加不加都行 GlobalMin=ObjEmp(find(ObjEmp==min(ObjEmp),end)); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GlobalParams=Employed(find(ObjEmp==min(ObjEmp),end...

在Matlab下输入:edit,然后将下面两行百分号之间的内容,复制进去,保存 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function f=f31(x) f=1./[(x-2).^2+0.1]+1./[(x-3).^4+0.01]; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 返回...

t=rand(1,100);%%0-1区间 s=rand(1,100);%%0-1区间 x=t+s; y=t.*s; z=exp(t-s); figure,plot3(x,y,z,'.r'); grid on %%%%%%%%%%%%%%%%%%%%%%%%%% >> x=rand(1,300); y=rand(1,300); figure,plot(x,y,'.r') >> n=0; >> for i=1:300 if sqrt((x(i)...

也是自己找来的,原代码有少许错误,本人都已更正了,调试运行都通过了的。 对于初学者,尤其是还没有编程经验的非常有用的一个文件 遗传算法实例 % 下面举例说明遗传算法 % % 求下列函数的最大值 % % f(x)=10*sin(5x)+7*cos(4x) x∈[0,10] % % ...

计算重心公式: 与物理学概念的重心类似,只是P代表像素值 I = imread('1.jpg');I = rgb2gray(I);imshow(I);I = double(I);[rows,cols] = size(I); x = ones(rows,1)*[1:cols];y = [1:rows]'*ones(1,cols); area = sum(sum(I)); meanx = sum(sum(I...

举个例子,希望有所帮助。代码:clc; clear all; close all; %%%%%%%%%%%单叶双曲面%%%%%%%%%%% xa=-2:0.2:2; ya=xa; [x,y]=meshgrid(xa,ya); a=1;b=1;c=1;% 假设a=1;b=1;c=1 z1=sqrt(c.^2*(x.^2/(a.^2)+y.^2/(b.^2)-1)); z2=-sqrt(c.^2*(x.^2/(...

在Matlab下输入:edit zhidao_feiying.m,然后将下面两行百分号之间的内容,复制进去,保存 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function y=zhidao_feiying(t,x) a=1; b=2; c=3; d=4; %%比方说 %f=a*x+y-z; %g=b*sin(x*y)-c*cos...

在做类似设计,不知这段程序对你有用否 I=imread('Car.jpg'); [y,x,z]=size(I); myI=double(I); %%%%%%%%%%% RGB to HSI %%%%%%%% tic % 测定算法执行的时间,开始计时 %%%%%%%%%%% 统计分析 %%%%%%%%%%%%%%% %%%%%%%% Y 方向 %%%%%%%%%% Blue_y...

在Matlab下输入:edit zhidao_feiying.m,然后将下面两行百分号之间的内容,复制进去,保存 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function y=zhidao_feiying(t,x) a=1; b=2; c=3; d=4; %%比方说 %f=a*x+y-z; %g=b*sin(x*y)-c*cos...

网站地图

All rights reserved Powered by www.dftb.net

copyright ©right 2010-2021。
www.dftb.net内容来自网络,如有侵犯请联系客服。zhit325@qq.com