How to look at a keyword through code in MatLab? -- MatLab

 How to look at a keyword through code in MatLab? -- MatLab


If you wanna learn about this keyword,
you can use help cmd

e.g.
I wanna know syms cmd.
I can write the following line.

help syms

And I will see the output.

syms   Short-cut for constructing symbolic variables.
    syms arg1 arg2 ...
    is short-hand notation for creating symbolic variables
       arg1 = sym('arg1');
       arg2 = sym('arg2'); ...
    or, if the argument has the form f(x1,x2,...), for
    creating symbolic variables
       x1 = sym('x1');
       x2 = sym('x2');
       ...
       f = symfun(sym('f(x1,x2,...)'), [x1, x2, ...]);
    The outputs are created in the current workspace.
 
    syms  ... ASSUMPTION
    additionally puts an assumption on the variables created.
    The ASSUMPTION can be 'real', 'rational', 'integer', or 'positive'.
    syms  ... clear
    clears any assumptions on the variables created, including those
    made with the ASSUME command.
 
    syms ... [nrows,ncols] matrix
    declares the variables symbolic matrices
 
    syms({symvar1, symfun1,  ...})
    is equal to the call syms 'symvar1' 'symfun1'  ...
 
    syms({symvar1, symfun1, ...}, ASSUMPTION)
    is equal to the call syms 'symvar1' 'symfun1'  ... ASSUMPTION
 
    syms([symvar1, symvar2,  ...])
    is equal to the call syms 'symvar1' 'symvar2'  ...
 
    syms([symvar1, symvar2, ...], ASSUMPTION)
    is equal to the call syms 'symvar1' 'symvar2'  ... ASSUMPTION
 
    Each input argument must begin with a letter and must contain only
    alphanumeric characters.
 
    S = syms returns a cell array containing the names of the symbolic
    variables in the workspace. Without an output argument, syms lists
    the symbolic variables in the workspace.
 
    Example 1:
       syms x beta real
    is equivalent to:
       x = sym('x','real');
       beta = sym('beta','real');
 
    To clear the symbolic objects x and beta of 'real' or 'positive'
    status, type
       syms x beta clear
 
    Example 2:
       syms x(t) a
    is equivalent to:
       a = sym('a');
       t = sym('t');
       x = symfun(sym('x(t)'), [t]);
 
    Example 3:
       syms({sym('u'), sym('v'), sym('w')})
    is equivalent to:
       syms u v w
 
    Example 4:
       syms({symfun('u(t)',sym('t')), symfun('v(t)',sym('t')), symfun('w(t)',sym('t'))})
    is equivalent to:
       syms u(t) v(t) w(t)
 
    Example 5:
       syms({sym('u'), sym('v'), sym('w')}, 'real')
    is equivalent to:
       syms u v w real
 
    Example 6:
       syms([sym('u'), sym('v'), sym('w')])
    is equivalent to:
       syms u v w
 
    Example 7:
       Clear all symbolic variables in the workspace:
       syms u v w
       S = syms;
       cellfun(@clear, S);
 
    Example 8:
       Create a symbolic matrix variable
       syms A [3 4] matrix
    is equivalent to:
       A = symmatrix('A', [3 4]);
 
    See also sym, symfun, symmatrix.
    Deprecated API:
    The 'unreal' keyword can be used instead of 'clear'.

    Documentation for syms

If you wanna search all keyword in help entries,
you can use lookfor cmd.

more details on:
help
lookfor

Comments

Popular posts from this blog

diagonal matrix--diag

a convenient type to record lots of value in MatLab -- cell matrix

Anonymous Function in MatLab