what is the meaning of this colon?and this sentence quant_set(i,:) = [ink(1,2*(i-1)+1) q05(i) q95(i)];
Show older comments
x_ink = data_rampe(101,18)/s; for i = 1:designs name(i,1) = data(1,1); set_data(:,1) = data(1:101,18); set_data(:,2) = data(1:101,19); % Inkremente herausschneiden und in ink abspeichern for n = 1:s a = find(set_data(:,1)>=(x_ink*n),1,'first'); ink(i,2*(n-1)+1) = set_data(a,1); ink(i,2*n) = set_data(a,2); ink_x(i,n) = set_data(a,1); ink_y(i,n) = set_data(a,2); end % Reduziert die Datenmenge um ein Design data(1:101,:) = []; end %% Bestimmung der 5 - 95 % - Werte for i = 1:s q05(i) = quantile(ink(:,2*i),y_low); q95(i) = quantile(ink(:,2*i),y_up); quant_set(i,:) = [ink(1,2*(i-1)+1) q05(i) q95(i)]; end
Answers (1)
Star Strider
on 14 Feb 2017
The assignment:
quant_set(i,:) = [ink(1,2*(i-1)+1) q05(i) q95(i)];
creates a (1x3) row vector for row ‘i’ of the ‘quant_set’ matrix with the designated elements. The colon operator ‘:’ could be replaced by ‘quant_set(i,1:3)’. The default colon operator ‘:’ is easier, especially if the programmer wants to change the number of columns as the script may require as it is developed.
Categories
Find more on Grid Lines, Tick Values, and Labels in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!