Path: news.mathworks.com!not-for-mail
From: "Jules Kassmann" <jules.kassmann@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Numerical integration usibg Matlab
Date: Sat, 12 Mar 2011 18:11:04 +0000 (UTC)
Organization: City University
Lines: 14
Message-ID: <ilgcvo$gnk$1@fred.mathworks.com>
References: <ilfo0h$1tl$1@fred.mathworks.com> <ilgajd$dqt$1@fred.mathworks.com>
Reply-To: "Jules Kassmann" <jules.kassmann@gmail.com>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1299953464 17140 172.30.248.35 (12 Mar 2011 18:11:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 12 Mar 2011 18:11:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2778528
Xref: news.mathworks.com comp.soft-sys.matlab:715405

"Roger Stafford" wrote in message <ilgajd$dqt$1@fred.mathworks.com>...
> "Jules Kassmann" <jules.kassmann@gmail.com> wrote in message <ilfo0h$1tl$1@fred.mathworks.com>...
> > ........
> >     y2 = 1./x2;
> > .......
> - - - - - - - - 
>   When using 'quad' you have multiplied by -n*R*T but not when doing the trapezoidal integration, where you just took the reciprocal.
> 
> Roger Stafford


Thank you.
That solves the problem of the first calculation. After that, in the for loop, the remaining problem is that I get 10, then 20, then 30, then 40, then 60, then 80 and finally 100 values (so overall 340 values). most of them are zeros...
I understand that I get the number of values of my N array [10, 20, 30, 40, 60, 80, 100] but I have no idea why.