Creating an empty sym variable?

3 次查看(过去 30 天)
Hello,
How I can create an empty 0x0 sym variable? Such as x=[] x={}, expect I want to make x an empyt sym, not an empty double or cell.
Thank you, Kevin

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2013-2-15
  3 个评论
Azzi Abdelmalek
Azzi Abdelmalek 2013-2-15
Even with double
x=[];
y=10
a=y+x % is different from y, it gives []
a=[x y], % gives y
Now with sym
x=sym([])
syms y
a=x+y, % the result is x
a=[x y] % the result is y

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Symbolic Math Toolbox 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by