question for a beginner

조회 수: 2 (최근 30일)
Eliraz Nahum
Eliraz Nahum 2018년 9월 22일
답변: Star Strider 2018년 9월 22일
hey, when using syms y(x) do I define both y and x as symbolic? I thought that I have to write it this way - syms y(x) x

채택된 답변

Star Strider
Star Strider 2018년 9월 22일
Not necessarily.
This works:
syms y(x)
y(x) = x^2;
as will this:
syms y x
y(x) = x^2;
while this will throw an error:
syms y
y(x) = x^2;
I default to defining all variables in a syms declaration, just to be safe (and compulsive).

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Conversion Between Symbolic and Numeric에 대해 자세히 알아보기

태그

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by