Randomly samplying a matrix
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Im currently modifying an algorithm which randomly samples a given matrix by
% Omega - set of observed entries. Should be linearly indexed.
%
% A - data vector of the form M(Omega)
[m,n] = size(M);
I = randi([0 1],m,n);
Omega = find(I);
A = M(Omega);
I wonder is it possible to replace the omega by a mask image which is made of text intead of randomly generating it.
2 Kommentare
KSSV
am 8 Jul. 2020
Omega in the above line of codes is a inde, it should be logical/ double. How you can take a text?
Antworten (0)
Siehe auch
Kategorien
Mehr zu Creating and Concatenating Matrices 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!
