[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bi variate to mono variate functions
From: |
David Bateman |
Subject: |
Re: Bi variate to mono variate functions |
Date: |
Thu, 30 Mar 2006 17:13:26 +0200 |
User-agent: |
Mozilla Thunderbird 1.0.6-7.5.20060mdk (X11/20050322) |
John W. Eaton wrote:
>On 30-Mar-2006, David Bateman wrote:
>
>| I have R14sp3 installed, which I believe is the latest version as it is
>| dated Feb 13, 2006. So I don't think it is fixed...
>
>Strange. Here is what I see with the version installed on the UW COE
>systems (Version 7.1.0.183 (R14) Service Pack 3, August 02, 2005):
>
> >> type myfun2
>
> function y = myfun2(x,c)
> y = 1./(x.^3-2*x-c);
>
> >> p = 5
>
> p =
>
> 5
>
> >> quad (@(x) myfun2 (x, p), 0, 2)
>
> ans =
>
> -0.4605
>
>
>Also, this type of behavior is documented for fsolve:
>
> >> help fsolve
> FSOLVE solves systems of nonlinear equations of several variables.
>
> [...]
>
> To solve the system of equations for a specific value of c, first assign
> the value to c. Then create a one-argument anonymous function that captures
> that value of c and calls myfun with two arguments. Finally, pass this
> anonymous
> function to FSOLVE:
>
> c = -1; % define parameter first
> x = fsolve(@(x) myfun(x,c),[-5;-5])
>
> See also OPTIMSET, LSQNONLIN, @, INLINE.
>
>
>jwe
>
>
>
Sorry my fault.. It helps if I define "p" :-)
D.
--
David Bateman address@hidden
Motorola Labs - Paris +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin +33 6 72 01 06 33 (Mob)
91193 Gif-Sur-Yvette FRANCE +33 1 69 35 77 01 (Fax)
The information contained in this communication has been classified as:
[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary
- Re: Bi variate to mono variate functions, David Bateman, 2006/03/30
- Re: Bi variate to mono variate functions, David Bateman, 2006/03/30
- Re: Bi variate to mono variate functions, John W. Eaton, 2006/03/30
- Re: Bi variate to mono variate functions, David Bateman, 2006/03/30
- Re: Bi variate to mono variate functions, John W. Eaton, 2006/03/30
- Re: Bi variate to mono variate functions, John W. Eaton, 2006/03/30
- Re: Bi variate to mono variate functions, David Bateman, 2006/03/31
- Re: Bi variate to mono variate functions, John W. Eaton, 2006/03/31
- Re: Bi variate to mono variate functions, David Bateman, 2006/03/31