y =
My code answers empty sym 0 by 1, except when the symbol equals zero.
Ältere Kommentare anzeigen
I don't know why a majority of my code says, "Empty sym: 0-by-1", except when x equals zero. I don't know what's wrong.
syms x
y=(x^2)-(x/(x+3))
y0=solve(x,0)
y1=solve(x,1)
y2=solve(x,2)
y3=solve(x,3)
y4=solve(x,4)
y5=solve(x,5)
y6=solve(x,6)
y7=solve(x,7)
Antworten (2)
I don't know what you mean by "solve(x,7)", e.g.
If you want to insert x = 7 in the expression for y, use
syms x
y=(x^2)-(x/(x+3))
subs(y,x,7)
syms x
y1=solve(x,1)
That means to solve the system of simultaneous equations
x == 0
1 == 0
As it is impossible for 1 to equal 0, there cannot be a solution.
I suspect, by the way, that you want to solve y rather than x.
syms x
y=(x^2)-(x/(x+3))
solve(y, x)
but possibly you want
subs(y, x, 0:7)
Kategorien
Mehr zu Symbolic Math Toolbox finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
