for 1st you I equations I gave coding it accepted
and when I code the third one
it told me this Error using symfun/assume (line 12)
Assumptions on symbolic functions not supported. Make assumptions on symbolic variables and expressions instead
can anyone help me to figure this out why

1 件のコメント

Stephan
Stephan 2020 年 12 月 8 日
Please provide the whole code and the complete error message you get.

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

 採用された回答

Walter Roberson
Walter Roberson 2020 年 12 月 8 日

0 投票

It is not permitted to use
syms S_1(x) positive %or negative or real or any other flag
assume(S_1, 'positive') %or any other flag
assume(S_1 > 0) %or any other condition
Note that if you used
assume(S_1(x), 'positive') %or any other flag
assume(S_1(x) > 0) %or any other condition
then those would be permitted. S_1 in this context is a symfun, but S_1(x) is the result of invoking S_1 upon x, and so is a symbolic expression rather than a symfun.

4 件のコメント

Avinash T
Avinash T 2020 年 12 月 8 日
Bro why we are using those those % comments is those comments play a maojr role.
Walter Roberson
Walter Roberson 2020 年 12 月 8 日
The % comments play the major roll of documenting that the issue is not the flag positive alone, and that the same problem occurs for each of the documented symbolic flags.
Walter Roberson
Walter Roberson 2020 年 12 月 8 日
The known flags are
  • real
  • positive
  • integer
  • rational
You cannot use any of those in connection with declaring a function with syms
All of the following are wrong
  • syms f(x) real
  • syms f(x) positive
  • syms f(x) integer
  • syms f(x) rational
Avinash T
Avinash T 2020 年 12 月 9 日
Thanks bro I learned this from you.

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

その他の回答 (0 件)

製品

リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by