Using matlab function limit - matlab not able to calculate

조회 수: 1 (최근 30일)
Michael S
Michael S 2012년 11월 8일
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