How to display non-zero part of a curve
Mostrar comentarios más antiguos
Hi ,i have a function that I want to solve algorithm with taboo, I declared this function as follows:
function F=soleval(SB,SGM,eNodeB,c,h)
F=[0];
tabUnik = unique(SB);
tabaffes=bsxfun(@eq,tabUnik(:),SB);
tabaffee=bsxfun(@eq,SB(:),SB);
x=bsxfun(@eq,tabaffes,1);
z=bsxfun(@eq,1,tabaffee);
for k=1:SGM;
for e1=1:eNodeB;
for e2=1:eNodeB;
e1~=e2;
y(e1,e2)=z(e1,e2);
f=(c(k,e1))*x(k,e1)+(h(e1,e2))*(1-y(e1,e2));
F=[F;f];
end
end
end
in the main program and after passing through different instructions taboo algorithm I show the variation of this function using the plot function:
F=soleval(SB,SGM,eNodeB);
plot(F);
my problem is that I just want to display the non-zero part of the function. Thank you for helping me.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Code Performance en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!