Insert new values in specific position after processing
Ältere Kommentare anzeigen
I have a vector A of logical datatype size 5 x 1
A = [1 0 0 1 1 ];
Then I extracted the features where A = 1
ind1 = A(:,1) == 1;
A1 = Feat(ind1,:);
After processing I obtained a new vector
Anew = [ 1 0 1]
Now I want to insert the Anew back to A in the same position to obtain the result as
[1 0 0 0 1]
When I insert the vector back the values are not coming correctly.
Please can someone help me to insert Anew to A in the same position.
The size of vector A can vary
Akzeptierte Antwort
Weitere Antworten (1)
Voss
am 12 Feb. 2023
A(ind1) = Anew;
Kategorien
Mehr zu Multirate Signal Processing 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!