Author Topic: What's Error with the code  (Read 498 times)

Offline imdadullah

  • Newbie
  • *
  • Posts: 3
  • Matlab Forum
    • View Profile
What's Error with the code
« on: May 20, 2010, 07:35:38 PM »

n=671;
%data=a;                // data loaded from excel and named as a variable
for i=1:n
    for j=i+1:n
        for k=j+1:n
           zz= (i)+ (j)+ (k)
           if zz==30;
              re=i & j & k   
           end
        end
    end
end


       
Quote
For this code I have loaded the excel data in "a" variable. I want to sum the all possible combinations of size three.

Matlab and SimuLink Development Forum

What's Error with the code
« on: May 20, 2010, 07:35:38 PM »