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
2012-11-12
Reading that, I would think it quite unlikely that MATLAB would be able to derive the limit.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!