|
"Snow White" <gulesaman@gmail.com> wrote in message <gvmbhv$e2t$1@fred.mathworks.com>...
> i tried adding the dot... here is wat i get
>
> ??? Error using ==> horzcat
> CAT arguments dimensions are not consistent.
>
> Error in ==> refractive_index_estimation_moments at 260
> p = [A.^2 2*A.*C-1 2*A.*B+C.^2+D 2*B.*C B.^2];
> wat do i do abt this ?
Are ALL your arrays the same size?
(They need to be to things like A.*B+C)
As Steven asked before, are they supposed to be 3D?
>
> "Steven Lord" <slord@mathworks.com> wrote in message <gvju58$29$1@fred.mathworks.com>...
> >
> > "Snow White" <gulesaman@gmail.com> wrote in message
> > news:gvjtnt$2jn$1@fred.mathworks.com...
> > > hi,
> > >
> > > I have written the following code:
> >
> > *snip*
> >
> > > one=double(A^2);
> >
> > *snip*
> >
> > > and out of now where i started getting the following error
> > >
> > > ??? Undefined function or method 'mpower' for input arguments of type
> > > 'double' and attributes
> > > 'full 3d complex'.
> > >
> > > Error in ==> refractive_index_estimation_moments at 250
> > > one=double(A^2);
> > >
> > > can anyone help me with this?
> >
> > You can't raise a 3D array (A) to a power -- remember that A^2 is
> > essentially the same as A*A, and as far as I know there's no standard
> > definition for matrix multiplication on 3D arrays. If you're trying to
> > raise each element of A to the second power, then use the .^ operator
> > instead of the ^ operator.
> >
> > If you don't expect A to be 3D on that line, then you need to work your way
> > back through your code to determine where it becomes 3D and why.
> >
> > --
> > Steve Lord
> > slord@mathworks.com
> >
|