Update Array - I want to move the value at TEMP through to an array and display it all possible values of temp.

1 次查看(过去 30 天)
%disp('the parent objective values are');
for k=1:pop_size
temp=0;
temp1=0;
car=[]
obj(k)=0;
for i=1:n
temp1=temp1+Pg(k,i);
temp=temp+a(i)+b(i)*Pg(k,i)+c(i)*Pg(k,i)*Pg(k,i);
car=temp
end
temp2=Pd-temp1;
temp3=0;
if(temp2>0)
temp3=10.0*temp2;
end
obj(k)=temp+temp3;
% fprintf('fuelcost=%7.3f $\n',obj(k));
end
  1 个评论
dpb
dpb 2019-8-25
No idea what you mean, sorry.
Show us a sample set of data and what you want output to be.
There are too many missing/undefined variables in the above code snippet to do anything with.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by