Dear Harpreet,
Thank you for advise. It is little bit difficult for me to write down the correct Scilab commands by only reading the datafit help. Is following command right? (ym(n)=ym(n-1)*amp+Kpm*bmp*u(n-1-Tdm) where n=step=1:1:500) function y = FODDT(u,Kpm,Taum,Tdm,step,Tsamp) amp=exp(-Tsamp/Taum); bmp=1-amp; [ym,amp,bmp]=ym(step-1)*amp+Kpm*bmp*u(step-1-Tdm) endfunction Don't we need to write the object function? Object function is minimize the sum of error square = sum of (y(i)-ym(i))^2 How I should represent above equation in Scilab? Thanks for your kind advise. Best Regards, -- View this message in context: http://mailinglists.scilab.org/Optimization-First-order-delay-and-dead-time-TF-model-ID-CUTEr-tp4033749p4033793.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. _______________________________________________ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users