Creating an empty sym variable?

8 views (last 30 days)
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

Accepted Answer

Azzi Abdelmalek
Azzi Abdelmalek on 15 Feb 2013
  3 Comments
Azzi Abdelmalek
Azzi Abdelmalek on 15 Feb 2013
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
Azzi Abdelmalek
Azzi Abdelmalek on 15 Feb 2013
Maybe your are looking for
x=sym('0')

Sign in to comment.

More Answers (0)

Categories

Find more on Symbolic Math Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!