Using matlab function limit - matlab not able to calculate

1 visualización (últimos 30 días)
Michael S
Michael S el 8 de Nov. de 2012
Hi, I have a function:
f(k)=(e^(A^T+h*E_ij)-e^(t*A^T))/h
I want to send h to 0.
Variable for testing: A = [0 1 2 3; -1 0 -2 -3; 4 0 8 9; -6 -7 8 0]; i= 2; j= 3; t= 2;
my function:
"function f = gradA(k)
i=evalin('base','i'); % i is number in {1,2,3,4}
j=evalin('base','j'); % j is number in {1,2,3,4}
E=zeros(4,4);
E(i,j)=1; % E is real 4x4-Matrix, where all entries are 0, entry (i,j) is 1
A=evalin('base','A'); % A is real 4x4-Matrix
t=evalin('base','t'); % t is number in {1,2,...k,}
f=(expm ( t* (transpose(A)) + k*E) - expm(t*transpose(A)))/k;"
I run in matlab:
> syms k
> limit(gradA(k),k,0,'right')
But Matlab not able to calculate the limit - endless running. Any suggestion how to make it work? The limit is supposed to be existent in theory.
  8 comentarios
Walter Roberson
Walter Roberson el 12 de Nov. de 2012
Reading that, I would think it quite unlikely that MATLAB would be able to derive the limit.
Michael S
Michael S el 12 de Nov. de 2012
Ok, fair enough. At least the function is implemented correctly. With the rest I have to live. Thank you very much for your help

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by