plot objective function result versus number of generations

i have two m files one of them is the main and the other is the objective function . the file of the objective function have the variables that i want to plot versus the number of generations ,how to plot KP versus number of generations ? this is objective file
% %PID_objfun_ITAE.m
%____________________________________________________________________
function [ fx_val]=PID_objfun_ITAE(x_pop,options)
KP=x_pop(1); KI=x_pop(2)
%____________________________________________________________________ simopt = simset('solver','ode45','SrcWorkspace','Current','DstWorkspace','Current'); % Initialize sim options [tout,xout,yout,u] = sim('pid_INC_GA',[],simopt); yout; t =0:0.1:41; %[y t] = step(sys_controlled,time); % Step response of closed-loop
for i=1:401 error(i) = (abs(-26.3+yout(i)))*t(i);
end
ITAE=sum(error); %__________________________________________________________________
fx_val= ITAE

1 件のコメント

mado
mado 2013 年 5 月 1 日
any help??

回答 (0 件)

この質問は閉じられています。

タグ

質問済み:

2013 年 4 月 30 日

閉鎖済み:

2023 年 1 月 9 日

Community Treasure Hunt

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

Start Hunting!

Translated by