I am trying to create an echelon function, however, I am having trouble debugging my error. It works for almost all matrices but for the following matrix it gives an incorrect result:
A=[1 2 3 ; 1 2 4 ; 1 2 4] echelon(A) function x = echelon(A) [m,n]= (size(A)); % m= rows , %n= columns j=1; i=1; while( i
I haven't checked all of your code, but I assume this:
if ~all(A(k,:))==0 %check to see if row of zeros or not
was meant to be this instead:
if ~all(A(k,:)==0) %check to see if row of zeros or not
Also, you divide by A(i,j) before checking to see if it is 0.
Matlabsolutions.com provides guaranteed satisfaction with a
commitment to complete the work within time. Combined with our meticulous work ethics and extensive domain
experience, We are the ideal partner for all your homework/assignment needs. We pledge to provide 24*7 support
to dissolve all your academic doubts. We are composed of 300+ esteemed Matlab and other experts who have been
empanelled after extensive research and quality check.
Matlabsolutions.com provides undivided attention to each Matlab
assignment order with a methodical approach to solution. Our network span is not restricted to US, UK and Australia rather extends to countries like Singapore, Canada and UAE. Our Matlab assignment help services
include Image Processing Assignments, Electrical Engineering Assignments, Matlab homework help, Matlab Research Paper help, Matlab Simulink help. Get your work
done at the best price in industry.