how to delete some unwanted data from a large nomber of data?

I have a large number of data. some unwanted data are also present. How to delete those column containing the unwanted data?

 Accepted Answer

A=rand(10)
%If you want to delete column [1 3 5]
A(:,[1 3 5])=[]

5 Comments

[0 2 4 6;3 NaN 4 2;7 10 12 NaN;1 3 4 4;4 6 8 9]
how to delete column included 'NaN'?
A=[0 2 4 6;3 NaN 4 2;7 10 12 NaN;1 3 4 4;4 6 8 9]
A(:,any(isnan(A)))=[]
Thanks a lot.....your answers has been accepted......
@Azzi: I've removed the flag and accepted the answer.

Sign in to comment.

More Answers (0)

Asked:

on 23 Oct 2013

Commented:

Jan
on 22 Feb 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!