Using matlab function limit - matlab not able to calculate

1 次查看(过去 30 天)
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 个评论
Walter Roberson
Walter Roberson 2012-11-12
Reading that, I would think it quite unlikely that MATLAB would be able to derive the limit.
Michael S
Michael S 2012-11-12
Ok, fair enough. At least the function is implemented correctly. With the rest I have to live. Thank you very much for your help

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrix Indexing 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by