"Roger Stafford" wrote in message <jgs84p$2sf$1@newscl01ah.mathworks.com>...
> "Milos Milenkovic" <m.milenkovic@mathworks.com> wrote in message <jgrqc2$d5n$1@newscl01ah.mathworks.com>...
> > A =
> > 2 3 4 5 6 7
> > 1 2 3 3 4 5
> >
> > B =
> > 0 2 4 2 3 4
> > 3 4 6 4 7 8
> >
> > >> A1 = A(:,1:3:n); A2 = A(:,2:3:n); A3 = A(:,3:3:n);
> > B1 = B(:,1:3:n); B2 = B(:,2:3:n); B3 = B(:,3:3:n);
> > C1 = A2*B1+(A1A2)*B2; C2 = A2*B2; C3 = A3*B2+A2*(B3B2);
> > C(:,3:3:end) = C3; C(:,2:3:end) = C2; C(:,1:3:end) = C1;
> >
> > Dear,
> > what this means:
> > ??? Error using ==> mtimes
> > Inner matrix dimensions must agree.
> > Best,
> > Milos
>        
> Milos, in that code I gave you in the other thread I intended to use 'end' instead of 'n'. They should read:
>
> A1 = A(:,1:3:end); A2 = A(:,2:3:end); A3 = A(:,3:3:end);
> B1 = B(:,1:3:end); B2 = B(:,2:3:end); B3 = B(:,3:3:end);
> C1 = A2*B1+(A1A2)*B2; C2 = A2*B2; C3 = A3*B2+A2*(B3B2);
> C(:,3:3:end) = C3; C(:,2:3:end) = C2; C(:,1:3:end) = C1;
>
> Using the original version, if you happened to have the wrong value for n floating around you would get the error you described.
>
> Roger Stafford
Dear Roger,
thanks and once again thanks!! Sorry for this last stupid question, I didn't use Matlab for a long time. Some matrices are quadratic so n*3n is suitable, but for the other I will make appropriate adjustments that is not the problem. The computations for single case involve some 760*760, but for fuzzy that will be 760*(760*3). Sorry if I ask a few questions more.
Best,
Milos
