Path: news.mathworks.com!not-for-mail
From: "prabhakaran m" <prabha.gahon@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: help with double integration
Date: Thu, 29 Mar 2012 02:24:28 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 23
Message-ID: <jl0h4s$pht$1@newscl01ah.mathworks.com>
References: <jl0dnq$g19$1@newscl01ah.mathworks.com>
Reply-To: "prabhakaran m" <prabha.gahon@gmail.com>
NNTP-Posting-Host: www-04-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1332987868 26173 172.30.248.35 (29 Mar 2012 02:24:28 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 29 Mar 2012 02:24:28 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2438980
Xref: news.mathworks.com comp.soft-sys.matlab:762533

x=linespace(0,L,16);
y=linespace(0,2*pi*R,72)
      
for ii=1:length(x)
  for jj=1:length(y)
    const=0.0;
for m=1:16
    for n=1:74
        I_term=w(ii,jj)*cos((n-1)*theta(ii))*cos(2*(m-1)*pi*v(jj)/h); 
        const=const+I_term;
    end
end
result(m,n)=const;
end
end
        
 I2 = trapz(y,trapz(x,result))

working around the clock i have did upto this. here I2 should also be in the array size of (14,74) but i am getting the error like this

??? Error using ==> trapz
LENGTH(X) must equal the length of the first non-singleton dimension of Y.
what might be the problem