資源簡介
智能優(yōu)化算法及其MATLAB實(shí)例(第2版)-配書代碼,只有代碼。
代碼片段和文件信息
%%%%%%%%%f(x)=x+10sin(5x)+7cos(4x)%%%%%%%%%%
clear?all;??????????????%清除所有變量
close?all;??????????????%清圖
clc;????????????????????%清屏
x=0:0.01:10;
y=x+10*sin(5*x)+7*cos(4*x);
plot(xy)
xlabel(‘x‘)
ylabel(‘f(x)‘)
title(‘f(x)=x+10sin(5x)+7cos(4x)‘)
評(píng)論
共有 條評(píng)論