MATLAB Answers

0

How can I make function value symbolic?

Asked by Muhendisleksi on 29 Oct 2017
Latest activity Answered by Walter Roberson
on 29 Oct 2017
function t = turev(x,y)
.
.
.
end
x = x^2+y^2, y = 1
How can I make the function "x ^ 2 + y ^ 2" symbolic when I enter the values?

  0 Comments

Sign in to comment.

2 Answers

Answer by John D'Errico
on 29 Oct 2017

If either of x or y are already symbolic, then any computations done on them will also be symbolic.
You can create a symbolic constant or variable using sym or syms, depending on exactly how you want to do it.
help sym

  0 Comments

Sign in to comment.


Answer by Walter Roberson
on 29 Oct 2017

Please do not ask the same question multiple times. The hamsters are paddling as fast as they can.

  0 Comments

Sign in to comment.