help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help filling an array


From: Rob Teasdale
Subject: Re: Help filling an array
Date: Sun, 27 May 2007 15:27:25 -0700 (PDT)

Hi Muthiah,

Thanks for your reply.

quad() was my first choice (my old MATLAB book recommends this as well), but I 
could not figure how to pass it a vector when it was expecting a function (my 
results are actual pressure readings at a particular time rather than a model 
and any model tends to be quite inaccurate anyway)  From the manual


— Loadable Function: [v, ier, nfun, err] = quad (f, a, b, tol, sing)

Integrate a nonlinear function of one variable using Quadpack. 
The first argument is the name of the  function, the function handle or
the inline function to call to compute the value of the integrand

This is why I used trapz as it was simply a matter of passing it the limits of 
integration. I expected that I would modify it when I worked out how to pass it 
my results vector,

Thanks again,
Rob

----- Original Message ----
From: Muthiah Annamalai <address@hidden>
To: Rob Teasdale <address@hidden>
Cc: Søren Hauberg <address@hidden>; address@hidden
Sent: Sunday, 27 May, 2007 10:51:34 PM
Subject: Re: Help filling an array

IMHO quad() is the  fastest function for integration than most home-brewn
code, or even trapz I believe.
-Muthu


On 5/27/07, Rob Teasdale <address@hidden> wrote:
> Hi Søren
>
> Thanks for your response.  trapz is a function (trapezoidal rule for simple 
> integration), whilst t and p are vectors that hold the time and pressure 
> respectively. As I am (re)learning this style of language your term vectorize 
> will help, and I will do some searching for methods on how to achieve this. I 
> did leave this this afternoon and finalised another chapter, so I am happy to 
> get back to 'the fun bits!',
>
> Cheers
> Rob
>





      
___________________________________________________________________________________
How would you spend $50,000 to create a more sustainable environment in 
Australia?  Go to Yahoo!7 Answers and share your idea.
http://advision.webevents.yahoo.com/aunz/lifestyle/answers/y7ans-babp_reg.html




reply via email to

[Prev in Thread] Current Thread [Next in Thread]