question for a beginner
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Eliraz Nahum
el 22 de Sept. de 2018
Respondida: Star Strider
el 22 de Sept. de 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
0 comentarios
Respuesta aceptada
Star Strider
el 22 de Sept. de 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).
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Conversion Between Symbolic and Numeric en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!