Hi
Im very new to MatLab.
Im trying to get this loop to produce a 10×3 matrix and not 10 sepperate answers.
triCoord=10x9ntri = 10qTop = zeros(ntri,3)for n=1:ntriqTop =[]qTop(n,:) = [qTop mean(triCoord(n,[1 4 7])),mean(triCoord(n,[2 5 8])),mean(triCoord(n,[3 6 9]))]endqTop
Best Answer