Problem 7. Column Removal
Solution Stats
Problem Comments
-
21 Comments
All solutions with score 11 or 12 use the regexp cheat.
Is there somewhere to go to receive advice on how to improve your code?
i can't think of a better solution having size less than 19!
why isn't B = (A(:,n)=[]); working? thanks
How to improvise this code?
It's very MATLAB!
this was actually not that difficult :)
a good way to learn
There should be a single-column input matrix in the test suite.
This was fun! Not difficult, but kind of challenging!
A(n,:)=[]; B = A; it works,but I'm wrong,who tell me the reason?
Better test cases could be provided for edge cases.
Great problem.
Lets you dug deep into the documentation for an awesome solution.
This link might help : https://in.mathworks.com/help/matlab/math/removing-rows-or-columns-from-a-matrix.html
Good problem
good
Good one
Why this is not working?
B = A ( : , ~=n)
I know logic operator needs something~=n but I cannot decide how to correct it? Also, I can write if statement in a for loop but its size is huge.
good
function B = column_removal(A,n)
A(:,n) = [];
B = A;
end
Can someone please tell me what is wrong with this code?
@Shivi, it does work.
The tests don't check the cases for n=1 and n=num_cols(A).
Solution Comments
Show commentsProblem Recent Solvers22544
Suggested Problems
-
36907 Solvers
-
Remove all the words that end with "ain"
1964 Solvers
-
536 Solvers
-
Find out sum and carry of Binary adder
1079 Solvers
-
640 Solvers
More from this Author96
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!