Hello.I have a function I want to calculate its supremum. The function is below.I don't know how to do this in Matlab.Please help me.

 채택된 답변

Torsten
Torsten 2022년 9월 29일
편집: Torsten 2022년 9월 29일

1 개 추천

sup-norm is a theoretical concept.
There is no such function in MATLAB to calculate it for a general function.
In the case above you could use
syms t
f = (1-exp(-t))*heaviside(t);
limit(abs(f),t,Inf)
ans = 
1

댓글 수: 7

Walter Roberson
Walter Roberson 2022년 9월 29일
Note that limit() approaching infinity is not generally sufficient. For example if the function were multiplied by sin(t) then the maximum might occur before that.
@TorstenThank you very much
@Walter Roberson I didn't quite understand what you said. Could you please explain in more detail?
Torsten
Torsten 2022년 9월 30일
Walter Roberson means that this way to calculate the inf-norm of a function cannot be generalized to other functions.
E.g. if u(t) = sin(t), then sup | u(t) | = 1, but lim (t->oo) | sin(t) | does not exist.
@TorstenThanks for the detailed explanation.
Walter Roberson
Walter Roberson 2022년 10월 1일
or consider a Gaussian. The sup is at the peak but the limit at infinity is 0.
@Walter RobersonThank you for your answer.

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Sam Chak
Sam Chak 2022년 9월 30일

1 개 추천

I'm not sure if the following is what you want. But this 1st-order transfer function (taking the Laplace transform)
produces the same step response as the given Continuous-Time Signal. So the following computes the -Norm of the linear system, instead of the signal.
Also worth checking out these:
t = linspace(0, 10, 1001);
x = 1 - exp(-t);
G = tf(1, [1 1])
G = 1 ----- s + 1 Continuous-time transfer function.
subplot(211)
plot(t, x), grid on, xlabel('t'), title('Continuous-Time Signal')
subplot(212)
step(G, 10), grid on, xlabel('t'), title('Step Response of Transfer Function')
[ninf,fpeak] = norm(G, inf)
ninf = 1
fpeak = 0

댓글 수: 1

@Sam Chak The information you gave me was very useful. Thank you very much.

댓글을 달려면 로그인하십시오.

Osmar Tormena Júnior
Osmar Tormena Júnior 2023년 3월 30일

1 개 추천

Following p-norm definition, the supremum may be defined as:
Which may be computed by
Bx = limit((int(abs(x)^p, dummy, -Inf, Inf))^(1/p), p, Inf);
for a suitable dummy integration variable.
Alas, the solution appears to be beyond the Toolbox analytical capability. It fails for common signals like constants, unit step, etc. Even when it doesn't fail, it does not return the final result — although it still works with isfinite() function to test if . Really, the only kind of signal this has worked out is a gaussian.

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by