Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

How can I make function value symbolic?

조회 수: 2 (최근 30일)
Muhendisleksi
Muhendisleksi 2017년 10월 29일
마감: MATLAB Answer Bot 2021년 8월 20일
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?

답변 (2개)

John D'Errico
John D'Errico 2017년 10월 29일
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

Walter Roberson
Walter Roberson 2017년 10월 29일
Please do not ask the same question multiple times. The hamsters are paddling as fast as they can.

Community Treasure Hunt

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

Start Hunting!

Translated by