row filtering and pre-allocate
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Oday Shahadh
am 10 Jun. 2020
Kommentiert: madhan ravi
am 10 Jun. 2020
hi all,
here p is (1,3) vector,:
- how can I preallocate a.
- how can store each filtered rows in a seperate matrix.
Regards
for i=1:length(L);
a=p(p(:,3)==L(i),:);
end
0 Kommentare
Akzeptierte Antwort
madhan ravi
am 10 Jun. 2020
Bearbeitet: madhan ravi
am 10 Jun. 2020
a = cell(numel(L),1);
for ii = 1:numel(L);
a{ii} = p(p(:,3) == L(ii),:);
end
celldisp(a)
%or
a = num2cell(p(any(p(:,3) == L, 2), :),2)
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Matched Filter and Ambiguity Function finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!