Any possible ways (-fastest preferably) of doing the following without a for loop:
out = zeros(20,1)value = [1 2 3 4]frm = [4 9 14 16]to = [4 12 14 17]for i=1:length(frm) out(frm(i):to(i)) = value(i)end
assignmentfor loop
out = zeros(20,1)value = [1 2 3 4]frm = [4 9 14 16]to = [4 12 14 17]for i=1:length(frm) out(frm(i):to(i)) = value(i)end
Best Answer