From: Andy on
"Matt J " <mattjacREMOVE(a)THISieee.spam> wrote in message <i1nlvr$bus$1(a)fred.mathworks.com>...
> "Matt J " <mattjacREMOVE(a)THISieee.spam> wrote in message <i1nleg$6di$1(a)fred.mathworks.com>...
> > "Andy " <dcg48(a)cornell.edu> wrote in message <i1nk5r$dla$1(a)fred.mathworks.com>...
> >
> > > > It would be clearest to post for us the formula for T(i) in terms of A(i,j,k) and B
> > > I'm not sure the formula for T(i). T as a whole is the summation of A(:,j,k)*B(j,k) for all 15 columns (j) and 7 rows (k).
> > =====
> >
> > In that case, the first solution I gave you should have worked. I suggest you check the dimensions of A and T and post your full error messages.
> =================
>
> Note, for example, how the following does not result in an error. If all the matrices have the dimensions you claim, there should be no problem.
>
> >> A=rand(64^3,15,7); T=rand(64^3,1);
> >> B=reshape(A,64^3,[])\T; whos B
>
> Name Size Bytes Class Attributes
>
> B 105x1 840 double

Matt,
Thanks that worked perfectly. I found my typo when I had previously tried it too. Since B is now 105x1, how can I tell if it indexed it first by row then column, or vice versa?
From: Matt J on
"Andy " <dcg48(a)cornell.edu> wrote in message <i1nnv4$l2g$1(a)fred.mathworks.com>...

> Matt,
> Thanks that worked perfectly. I found my typo when I had previously tried it too. Since B is now 105x1, how can I tell if it indexed it first by row then column, or vice versa?
===============

If the original 64^3x15x7 array A was indexed A(i,j,k) then

B15x7=reshape(B,15,7)

will have rows correspondingly indexed by j and columns indexed by k.
First  |  Prev  | 
Pages: 1 2 3
Prev: Report Generator Batch
Next: Report Generator Book