Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

anames

Identifiers that have values or properties

MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

Syntax

anames(<All>, <User>)
anames(<Properties>, <User>)
anames(<Protected>, <User>)
anames(d, <User>)

Description

anames(All) returns all identifiers that have values.

anames(Properties) returns all identifiers that have properties.

anames(Protected) returns all identifiers that are protected.

anames(d) returns all identifiers that have values from the given domain d.

The result returned by anames is a set of unevaluated identifiers.

anames does not take into account slots of function environments or domains. Moreover, functions of a MuPAD® library are considered only if they are exported.

Examples

Example 1

anames(All, User) returns all user-defined identifiers:

a := b:  b := 2:  c := {2, 3}:
anames(All, User)

If the first argument is a domain, only identifiers with values from that domain are returned. These may differ from the identifiers whose evaluation belongs to the domain:

a, b;
anames(DOM_IDENT, User);
anames(DOM_INT, User)

Example 2

anames(Properties) returns all identifiers that have been attached properties via assume:

assume(x > y): anames(Properties)

Example 3

anames(Protected) returns all identifiers that are protected via protect; since all system functions are protected, we use anames(Protected, User):

protect(a): anames(Protected, User)

Parameters

d

A domain

Options

All

Get all identifiers that have values

Properties

Get all identifiers that have properties

Protected

Get all identifiers that are protected

User

Exclude all system variables

If the option User is given, only those identifiers are returned that have been assigned a value or a property, respectively, by the user.

Return Values

set of identifiers.

See Also

MuPAD Domains

MuPAD Functions

Was this topic helpful?