marzuki 0 Newbie Poster

I am the beginner in matlab, i made the following matlab code:

load gk.dat; % GK data
Dgk = gk(:,1);
vgk = gk(:,2);
[a,b]= size (gk);
for i=1:a
for j=1:b
if (Dgk > 5)
A (i,j)= gk(i,j)
end
end
end

What I need from the above code is:

Take all the data only if Dgk > 5, if this criterion is found, so take all the data in that coulumn and put in new matrix name for example A..I try to chek the A contain, bit it is zero..anybody could give help , why?

thanks
maru

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.