I want to go go through the whole matric and want to remove vectors of specific indeices that have probability fitness less than a specific value.

1 Ansicht (letzte 30 Tage)
I have found the probability of fitness of all my vectors in my matrix.But now i want to have my matrix back but with excluded vectors that have a probability fitness less than a specific value.
a=[1 1 1 0 0;1 1 0 1 0;1 1 0 0 1;................]
Now i my if the indices e.g 3 ,4 56, 57, 78 etc. have a value less that a specific value a want to remove those and want my matrix(a) population with all other vectors

Antworten (1)

Image Analyst
Image Analyst am 12 Sep. 2022
Try this;
a = rand(1, 100); % Sample data - use your actual vector.
indexesToRemove = [3, 4, 56, 57, 78]; % or indexesToRemove = a < specificValue;
a(indexesToRemove) = [];

Kategorien

Mehr zu Author Block Masks finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by