How can i write this Lyapunov equation in Matlab?

4 次查看(过去 30 天)
Hello,
I would like to ask you how can i write this equation? I am new in Matlab, and i tried this code:
n = 100000;
x0 = 0.1;
step = 0.001;
e = exp(1);
a = [0.001 : step : 0.05];
a * e.^(n * lyap(a)) == abs(f.^n .* (x0 + a) - f.^n .* (x0));
e.^(n.* lyap(a)) == abs(f.^n .*(x0+a) - f.^n .* (x0));
lyap(a) == (1/n) .* ln((abs(f.^n * (x0+a) - f .^n * (x0))/a));
but i have this error:
>> Lyapunov
Error using lyap (line 23)
Not enough input arguments.
Error in Lyapunov (line 7)
a * e.^(n * lyap(a)) == abs(f.^n .* (x0 + a) - f.^n .* (x0));
Is it completely wrong or do i miss something?
Thank you!

回答(1 个)

Shivang Srivastava
Shivang Srivastava 2021-3-25
Hi Eleni,
As per my understanding you are having trouble using lyap function. As the error suggest you have not sent sufficient parameters in lyap function.
X = lyap(A,Q)
This is the correct syntax for lyap function. You may refer to lyap documentation for more information.

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by