question for a beginner

1 vue (au cours des 30 derniers jours)
Eliraz Nahum
Eliraz Nahum le 22 Sep 2018
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

Réponse acceptée

Star Strider
Star Strider le 22 Sep 2018
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).

Plus de réponses (0)

Tags

Produits


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by