### Tags: andy, derivative, design, everyonei, function, implicit, indirectly, matlab, matrix, programming, variable

# derivative of matrix

On Programmer » Matlab

5,287 words with 3 Comments; publish: Wed, 07 May 2008 09:22:00 GMT; (20062.50, « »)

hello everyone

I have a matrix C which is implicit function of design variable x and

y i.e. C depends indirectly on x and y.I want to find the derivative

of this matrix using finite difference method.If anyone have idea how

to do it in matlab,please guide me.i will appreciate that.

Thanks

Amandeep Singh

*http://matlab.todaysummary.com/q_matlab_12775.html*

All Comments

Leave a comment...

- 3 Comments
- In article <ef28c3e.-1.matlab.todaysummary.com.webx.raydaftYaTP>, "Amandeep Singh"
<bhatti_aman.matlab.todaysummary.com.hotmail.com> wrote:

> hello everyone

> I have a matrix C which is implicit function of design variable x and

> y i.e. C depends indirectly on x and y.I want to find the derivative

> of this matrix using finite difference method.If anyone have idea how

> to do it in matlab,please guide me.i will appreciate that.

> Thanks

> Amandeep Singh

--

C, as an implicit function of x and y, would have a form:

F(C,x,y) = 0

for some function F. Therefore, writing C(x,y) for this

implicitly-defined function, we have

F(C(x,y),x,y) = 0

as an identity for all x and y. Hence, calculus tells us its derivatives ar

e:

dF/dC*dC/dx + dF/dx = 0

dF/dC*dC/dy + dF/dy = 0

where dF/dC, dF/dx, and dF/dy stand for the three partial derivatives of F

and dC/dx and dC/dy for the two partial derivatives of C. Hence, the

partial derivatives you are after would be:

dC/dx = - (dF/dx) / (dF/dC)

dC/dy = - (dF/dy) / (dF/dC)

That's as far as calculus can take it without knowing more about your

F. Perhaps you could give us a few details about that? Do you have a

large table of corresponding values of C, x, and y? Or perhaps a

symbolically-defined relationship?

(Remove "xyzzy" and ".invalid" to send me email.)

Roger Stafford

#1; Wed, 07 May 2008 09:23:00 GMT

- In article <ef28c3e.-1.matlab.todaysummary.com.webx.raydaftYaTP>, "Amandeep Singh"
- Hi Roger
Thanks for reply

Let me explain you in detail abt the problem.I have matrix B which is

explicit function of the x and y.I got matrices C by this way

A=I-B*pinvs(B) %where I is identity matrix

[U,S,V] = svd(A); % standard value decomposition

C=S*V';

so I got C by series of operation on B.

So in this way I do not think i have function F.I want to find the

variation in matrix C with change in x and y i.e. derivative of C

w.r.t. x and y at any particular value of x and y.

Thanks

Amandeep Singh

Roger Stafford wrote:

>

> In article <ef28c3e.-1.matlab.todaysummary.com.webx.raydaftYaTP>, "Amandeep Singh"

> <bhatti_aman.matlab.todaysummary.com.hotmail.com> wrote:

>

x

> and

> derivative

idea

> how

> --

> C, as an implicit function of x and y, would have a form:

> F(C,x,y) = 0

> for some function F. Therefore, writing C(x,y) for this

> implicitly-defined function, we have

> F(C(x,y),x,y) = 0

> as an identity for all x and y. Hence, calculus tells us its

> derivatives are:

> dF/dC*dC/dx + dF/dx = 0

> dF/dC*dC/dy + dF/dy = 0

> where dF/dC, dF/dx, and dF/dy stand for the three partial

> derivatives of F

> and dC/dx and dC/dy for the two partial derivatives of C. Hence,

> the

> partial derivatives you are after would be:

> dC/dx = - (dF/dx) / (dF/dC)

> dC/dy = - (dF/dy) / (dF/dC)

> That's as far as calculus can take it without knowing more about

> your

> F. Perhaps you could give us a few details about that? Do you

> have a

> large table of corresponding values of C, x, and y? Or perhaps a

> symbolically-defined relationship?

> (Remove "xyzzy" and ".invalid" to send me email.)

> Roger Stafford

>

#2; Wed, 07 May 2008 09:24:00 GMT

- Hi Roger
- In article <ef28c3e.1.matlab.todaysummary.com.webx.raydaftYaTP>, "Amandeep Singh"
<bhatti_aman.matlab.todaysummary.com.hotmail.com> wrote:

> Hi Roger

> Thanks for reply

> Let me explain you in detail abt the problem.I have matrix B which is

> explicit function of the x and y.I got matrices C by this way

> A=I-B*pinvs(B) %where I is identity matrix

> [U,S,V] = svd(A); % standard value decomposition

> C=S*V';

> so I got C by series of operation on B.

> So in this way I do not think i have function F.I want to find the

> variation in matrix C with change in x and y i.e. derivative of C

> w.r.t. x and y at any particular value of x and y.

> Thanks

> Amandeep Singh

--

I can't tell from your description how your matrix B depends upon x and

y. Are x and y scalar quantities? If so, I would use 'meshgrid' or

'ndgrid' to establish a gridwork of closely-spaced x and y values in a

rectangular region, and then use 'gradient' to find the approximate

partial derivatives of each component of C with respect to x and y

throughout that region. It would require first evaluating C for each

gridpoint.

You face the possible difficulty that C would not be unique if some of

the singular values in S happen to be equal, since in that case U and V

are not uniquely determined.

I would not characterize the relationship you have described for matrix

C on x and y as implicit. It looks explicit to me.

(Remove "xyzzy" and ".invalid" to send me email.)

Roger Stafford

#3; Wed, 07 May 2008 09:25:00 GMT

- In article <ef28c3e.1.matlab.todaysummary.com.webx.raydaftYaTP>, "Amandeep Singh"