MATLAB: How to display {m,n} with its answer for example {1,2}=2 display I have a set of 10 answer 2,3,5,6,3,7,3,2,4,5 i want to display them as {1,2}=2; {1,3}=3; {1,4}=5; {1,5}=6; {2,3}=3; {2,4}=7; {2,5}=3; {3,4}=2; {3,5}=4; {4,5}=5; please help me please please…. i will be so thankful Best Answer out = [ 2,3,5,6,3,7,3,2,4,5]count=0for i= 1:4 for j=i+1:5 count = count+1; result=out(count); disp(sprintf('{%d,%d}=%d',i,j,result)) endend Related SolutionsMATLAB: Finding average between TFunct1,TFunct2,TFunct3 Hi,how about this:TFunct=zeros(1700,1); % or whateverfor i = 1 : 17000TFunct(i,1)=mean([TFunct1(i,1),TFunct2(i,1),TFunct3(i,1)]);endor without a loop you can use this:>> A=[1 2;2 3;3 4;4 5;5 6]A = 1 2 2 3 3 4 4 5 5 6 >> B=[2 3;3 4;4 5;5 6;6 7]B = 2 3 3 4 4 5 5 6 6 7 >> C=[3 4;4 5;5 6;6 7;7 8]C = 3 4 4 5 5 6 6 7 7 8 >> D=[A(:,1)';B(:,1)';C(:,1)']D = 1 2 3 4 5 2 3 4 5 6 3 4 5 6 7>> mean(D)ans = 2 3 4 5 6 MATLAB: Help running Matlab script Related QuestionHow to calculate the mean of the elements values of the array according to objects of the other array.Count specific values in a matrix and Find row and column number of the first value among consecutive same values.How to split a 420×7 matrix into 60 7×7 matricesFind the pair of the matrixFind missing element between two matrix
Best Answer