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

질문:

2020년 12월 8일

댓글:

2020년 12월 9일

Community Treasure Hunt

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

Start Hunting!

Translated by