Problem 7. Column Removal
이전 댓글 표시
I don't know why my answer is wrong but please tell me..
function B = column_removal(A,n)
A=A(:,[1:n-1 n+1:end]);
haha=size(A);hasil=[];
A=A';
A=A(:)';
B =A;
end
댓글 수: 1
Jan
2013년 7월 14일
@ricardo: In general it is a good idea when you ask in the forum, that you explain, why you assume, that there is an error. E.g. post the complete message, if you get an error, or explain the difference between your expectations and the results. Relying of the power of the forum users to guess the problem works sometimes only.
채택된 답변
추가 답변 (1개)
Azzi Abdelmalek
2013년 7월 14일
There is no error in your code. What is the expected result?
If you want to remove a column number n
A=magic(5) % Example
n=3 % column to be removed
Result=A;
Result(:,n)=[]
댓글 수: 3
ricardo gunawan
2013년 7월 14일
Azzi Abdelmalek
2013년 7월 14일
What?
Jan
2013년 7월 14일
@ricardo: Neither wkwkw nor the fancy character thing is useful here. We are interested in Matlab, but not cool.
카테고리
도움말 센터 및 File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!