-
2 Comments
Laza Álmos
on 27 Mar 2020
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;
c=a(:,1);
d=[]
for i=1:length(c)
d(i)=sum(a(i,:))
end
[M,idx]=max(d)
b=idx
end
why does this not work?
OMKARAM RAJESHWARA RAJU
on 13 Aug 2020
a(:,2) should be multiplied with 0.05
a(:,3) should be multiplied with 0.1
since they are not ordered in the question
thank you
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!