How to get values from index in a matrix?
1 Ansicht (letzte 30 Tage)
x = [Structure.GK_10.GA_0; Structure.GK_10.GA_10; Structure.GK_10.GA_20; Structure.GK_10.GA_30;...
[row,col] = size(x);
for i = 1:row
not_zero = find(x(i,:) ~= 0);
%DOES NOT WORK val_not_zero = x(i(not_zero,:));
mean_first_15 = mean(val_not_zero(1:15));
i just want to tranfer the indices into real values again, but how can i do it in a matrix. In this loop i i grab the indices that are not zero in the first row. Then i try to get the values in the next line, but it doesnt work, can someone help me?