help with symbolic int result

2 ビュー (過去 30 日間)
CD
CD 2024 年 2 月 6 日
編集済み: Walter Roberson 2024 年 2 月 6 日
I ran into a problem, symbolic int results include int, adding a second variable, theta + psi, when using symbolic int.
Attached the "Code" and "Result" below.
Rather than randomly implementing all permutations of "assume()" and "simplify()" would someone please guide me to generating a result with the symsbolic "int" term?
Thank you
Code:
syms theta psi No Lo
N1 = (sym(1)/sym(2))*(No/sym(1))*sign(sin(sym(1)*theta + psi));
assume(theta>0 & theta<2*pi)
assume(theta, "real")
L11 = Lo*int((subs(N1,theta, theta + psi))^2, theta, 0, 2*pi)
simplify(L11, Steps=10)
Result:
(Lo*No^2*int(sign(sin(theta + 2*psi))^2, theta, 0, 2*pi))/4
  4 件のコメント
Torsten
Torsten 2024 年 2 月 6 日
And what is your question ?
CD
CD 2024 年 2 月 6 日
Torsten,
Walter Roberson is working this in a direction that I like.

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

採用された回答

Walter Roberson
Walter Roberson 2024 年 2 月 6 日
編集済み: Walter Roberson 2024 年 2 月 6 日
syms theta psi No Lo real
assumeAlso(theta>0 & theta<2*pi)
N1 = (sym(1)/sym(2))*(No/sym(1))*sign(sin(sym(1)*theta + psi));
L11 = Lo*int((subs(N1,theta, theta + psi))^2, theta, 0, 2*pi)
L11 = 
simplify(L11, Steps=10)
ans = 
The sign of psi is not defined, so this is the best you can do.
  5 件のコメント
CD
CD 2024 年 2 月 6 日
Perhaps better question:
Given my latest code list ...
Should I stop at the ouput of L11 then rebuild the derivation of L11 with psi removed given the piecewise results with psi then continue to derive L12?
Or is there a smarter way of getting to L12 with psi part of L11?
Walter Roberson
Walter Roberson 2024 年 2 月 6 日
編集済み: Walter Roberson 2024 年 2 月 6 日
How might I set psi (within L11) to some value/offset here then continue on with the following code???
newL11 = subs(L11, psi, DesiredValue)

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMathematical Functions についてさらに検索

タグ

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by