Info
此问题已关闭。 请重新打开它进行编辑或回答。
How can I make function value symbolic?
2 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
回答(2 个)
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
0 个评论
Walter Roberson
2017-10-29
Please do not ask the same question multiple times. The hamsters are paddling as fast as they can.
0 个评论
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!