MATLAB: What are all possibilities for a,b,c to be 72 system solve a = [0:1:20]; b = [0:1:20]; c = [0:1:20]; i want to know what all the possibilities are of the product of a*b*c to be 72 i tried with an if statement but this doesn't work. Best Answer a = nchoosek(1:72, 3);idx = prod(a, 2) == 72;a(idx, :) Related SolutionsMATLAB: Different output for each condition I was advised to use switch blocks to set the output. Thanks MATLAB: Vector output from a for loop TMP =[12, 3, 36];PGRED=zeros(size(TMP));for ii=1:length(TMP) if TMP(ii) < 9 PGRED(ii)=0; elseif 9<=TMP(ii) && TMP(ii)<10 PGRED(ii)= TMP(ii)-9; elseif 10<=TMP(ii) && TMP(ii)<28 PGRED(ii)= 1; elseif 28<=TMP(ii) && TMP(ii)<40 PGRED(ii)= -0.083*TMP(ii) + 3.33; else %40 >= TMP(ii) % this condition is not required. Just give a default condition. PGRED(ii)=0; end end Related QuestionGiven two vectors A and B, what is the best way to generate the vector C such that sum(C==A(i)) = B(i)???index exceeds matrix dimensionsHow to use all the other indices except of the ones given in an arrayFunction that calls functions
Best Answer