From: Mauro on
I have a matrix which is indexed by a parameter, something like:

2-x 3
4 1+x

where x is a vector; so there is one matrix corresponding to each
value of x. I want to take the matrix exponential of this. Is there a
way to do it without using a "for" loop over all the values of x?

Thanks,

Mauro
From: John D'Errico on
Mauro <msmscarlatti(a)googlemail.com> wrote in message <d1f6d508-89a6-4742-83fe-9a68d7ebe393(a)e5g2000yqn.googlegroups.com>...
> I have a matrix which is indexed by a parameter, something like:
>
> 2-x 3
> 4 1+x
>
> where x is a vector; so there is one matrix corresponding to each
> value of x. I want to take the matrix exponential of this. Is there a
> way to do it without using a "for" loop over all the values of x?
>

While arrayfun will do it, a loop will do so as easily
and as efficiently. There is no magic solution, unless
you build the exponential in symbolic form. And of
course, that may be complicated, depending on the
form of your matrix.

John
 | 
Pages: 1
Prev: aoctool problem
Next: Reply for u mr. US