Problem:
I'd like to calculate a limit, but for some reason I can't use the '/' operand. Can somebody explain why?
Error message:
Error using / (line 485)
Invalid operands.
Code:
syms s;
limit(s/(((2*eulergamma^(-23*s)/a)*1.07 + 0.0114/s + 25.3045*s))*1/s, s, 0)

6 件のコメント

Ive J
Ive J 2022 年 2 月 22 日
I assume a is a vector(?)
what about this?
limit(s./(((2*eulergamma^(-23.*s)./a)*1.07 + 0.0114./s + 25.3045.*s))*1./s, s, 0)
Damián Bombara
Damián Bombara 2022 年 2 月 22 日
That worked but I've changed it up a bit and I got new error message :D
GS is a transfer function and GRS is holding 3 things, P, I & D parameters of PID regulator
limit((s.*1./s)./(1 + GS*GRS), s, 0)
Error using sym/subsindex (line 953)
Invalid indexing or function definition. Indexing must follow MATLAB indexing. Function arguments must be symbolic variables, and
function body must be sym expression.
Error in sym/subsref (line 997)
R_tilde = builtin('subsref',L_tilde,Idx);
Ive J
Ive J 2022 年 2 月 22 日
Maybe you can share GS and GRS? I guess something's wrong with GS definition (have you seen here?).
Damián Bombara
Damián Bombara 2022 年 2 月 22 日
GRS: val =
(50609*s)/2000 + 57/(5000*s) + 107/100
GS: val =
(2/eulergamma^(23*s))/((93*s)/2 + 1)^2
Ive J
Ive J 2022 年 2 月 22 日
I can't replicate the error:
syms s;
GRS = (50609*s)/2000 + 57/(5000*s) + 107/100;
GS = (2/eulergamma^(23*s))/((93*s)/2 + 1)^2;
limit((s.*1./s)./(1 + GS*GRS), s, 0)
ans = 
0
BTW, you should note that there is a huge difference between * and .* in MATLAB
Damián Bombara
Damián Bombara 2022 年 2 月 22 日
That's weird, now it's working. I didn't change anything but it works.
Well, thank you very much for your help, I really appreciate it!

サインインしてコメントする。

 採用された回答

Damián Bombara
Damián Bombara 2022 年 2 月 22 日

0 投票

@Ive J solved it in the comments.

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Platform and License についてさらに検索

製品

リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by