This solution is outdated. To rescore this solution, sign in.
-
4 Comments
Show
1 older comment
Sudhir Kumar
on 18 Oct 2018
Please Help I have already run this code in matlab but still get wrong here
Sudhir Kumar
on 18 Oct 2018
If Anybody can help me i strongly grateful to him
Gustavo Morales
on 15 Nov 2019
Could fail the last test, if A has only 1 column:
c = 1
Bad indexing (r,c-1) == (r,0)
You got to catch case c = 1 and don't swap at all
Gustavo Morales
on 15 Nov 2019
And................ obviosly
"Undefined function or variable 'C1'."
You have made assignments in wrong order.
Your code says: A(:,1)=C1
Should say: C1 = A(:,1);
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!