Using matlab function limit - matlab not able to calculate

2 views (last 30 days)
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 Comments
Walter Roberson
Walter Roberson on 12 Nov 2012
Reading that, I would think it quite unlikely that MATLAB would be able to derive the limit.
Michael S
Michael S on 12 Nov 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

Sign in to comment.

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!