I have two problems....
Ältere Kommentare anzeigen
Hi everybody. I have two problems. I think they are simple to solve but I cannot at this time!!!, I don't know how!!!
First problem: I constructed a matrix dkc of size (1057 X 11), and many zeros inside. I used this code to remove zeros:
for g=1:11
new_variable = dkc( dkc(:,g)~=0, 2);
end
but I got the resulted matrix in only one column. I want the matrix as it is, 2D with 11 columns, without zeros in the array.
Second problem I have, when I have another column say s with a different length than the previous matrix dkc. Can I check which column in dkc is nearest in its elements with this elements of s? and how? And which method will use?
Thanks for all, and really I need urgently these solutions to complete my research.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Logical finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!