On 16.02.13 15:06, Shishir Jaiswal wrote: > I need to define a positive symbolic expression say 'n'. > I am using 'sym' or 'syms' (for multiple symbols). In one machine (PC) it is working fine but in another following error is coming:
Just a quick note: The difference between sym and syms is not whether you want a single or multiple symbols. It is true that syms can create multiple symbols at the same time, but the primary difference is that syms assigns the symbolic variable to the name given:
>> sym x
>> whos Name Size Bytes Class Attributes
ans 1x1 112 sym
>> syms x >> whos Name Size Bytes Class Attributes
ans 1x1 112 sym x 1x1 112 sym
Also, sym can handle expressions, while syms only defines variables and abstract functions. Note that entering expressions into sym is not really recommended, since the syntax is subtly different from MATLAB expressions.