Problem 9. Who Has the Most Change?

ricardo gunawan el 15 de Jul. de 2013
Actividad más reciente Respuesta de Jan a las el 15 de Jul. de 2013

function b = most_change(a)
a(:,1)=a(:,1)*0.25;
a(:,2)=a(:,2)*0.1;
a(:,3)=a(:,3)*0.05;
a(:,4)=a(:,4)*0.01;
d=sum(a,2);
c=max(d);
for i=1:length(d)
if d(i)==c
b=i;
end
end
i got wa please explain idont understand
Jan
Jan el 15 de Jul. de 2013
Set a break point in the first line (see the small lines left beside the editor pane) and start the code. Searching in the documentation for "debugger" will be a revelation also:
docsearch debugger
ricardo gunawan
ricardo gunawan el 15 de Jul. de 2013
ok.... i just newbie .how to use debugger??
Jan
Jan el 15 de Jul. de 2013
@ricardo: Please try to solve your Cody stuff by your own. Letting the forum fix your code is neither the intention of Cody nor of the Answers forum. Run your code locally and use the debugger to see what's going on. Thanks.
Azzi Abdelmalek
Azzi Abdelmalek el 15 de Jul. de 2013
What part is not clear?
ricardo gunawan
1
Publicación
1
Responder

Etiquetas