Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Error : Inner matrix dimensions must agree When computing the three dimensional integral.
Replies: 7   Last Post: Jun 24, 2013 11:14 AM

 Messages: [ Previous | Next ]
 Curious Posts: 2,359 Registered: 12/6/04
Re: Error : Inner matrix dimensions must agree When computing the three dimensional integral.
Posted: Jun 19, 2013 4:27 PM

"yolanda" wrote in message <kpskm1\$d1b\$1@newscl01ah.mathworks.com>...
> Error : Inner matrix dimensions must agree When computing the three dimensional integral.
>
> The code is as follows:
>
> m1 = 20;
> v1 = 60;
> m2 = 20;
> v2 = 60;
> m3 = 20;
> v3 = 60;
> cov = [ 60,0,0;
> 0,60,0;
> 0,0,60]
> cov1=inv(cov)
>
> f = @(z,y,x) exp( ([(x-m1),(y-m2),(z-m3)]*(cov1)*[(x-m1);(y-m2);(z-m3)])./(-2) )
>
> I am eager to getting the solution.... Anyone has any comments? I would appreciate !!!!!

I don't have MATLAB installed on this computer,
but I'm wondering if you have the commas & semicolons
reversed in your anonymous function handle statement.

Just a thuoght since no one else has replied.

Date Subject Author
6/19/13 yolanda
6/19/13 Curious
6/19/13 yolanda
6/19/13 yolanda
6/19/13 yolanda
6/20/13 Steven Lord
6/20/13 yolanda
6/24/13 Steven Lord