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 comentario

Stephan
Stephan el 8 de Dic. de 2020
Please provide the whole code and the complete error message you get.

Iniciar sesión para comentar.

 Respuesta aceptada

Walter Roberson
Walter Roberson el 8 de Dic. de 2020

0 votos

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 comentarios

Avinash T
Avinash T el 8 de Dic. de 2020
Bro why we are using those those % comments is those comments play a maojr role.
Walter Roberson
Walter Roberson el 8 de Dic. de 2020
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 el 8 de Dic. de 2020
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 el 9 de Dic. de 2020
Thanks bro I learned this from you.

Iniciar sesión para comentar.

Más respuestas (0)

Productos

Versión

R2020a

Preguntada:

el 8 de Dic. de 2020

Comentada:

el 9 de Dic. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by