Quantcast
Channel: Mein MATLAB Forum - goMatlab.de
Viewing all articles
Browse latest Browse all 28441

eine Matrix generieren

$
0
0
Hallo Dupit, Oder: M = zeros(4, 4); M(randperm(16, 4)) = 1; Das funktioniert erst mit neueren Matlab Versionen, weil vorher RANDPERM noch kein 2.tes Input-Argument entgegen nahm. Dann: M = zeros(4, 4); Index = randperm(16); M(Index(1:4)) = 1; Gruß, Jan

Viewing all articles
Browse latest Browse all 28441

Latest Images

Trending Articles