Problem 7. Column Removal
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.
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
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.
function B = column_removal(A,n)
A(:,n) = ;
B = A;
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 CommentsShow comments
Problem Recent Solvers22565
More from this Author96
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!