当前位置:文档之家› rfc3814.Multiprotocol Label Switching (MPLS) Forwarding Equivalence Class To Next Hop Label Forwardi

rfc3814.Multiprotocol Label Switching (MPLS) Forwarding Equivalence Class To Next Hop Label Forwardi

rfc3814.Multiprotocol Label Switching (MPLS) Forwarding Equivalence Class To Next Hop Label Forwardi
rfc3814.Multiprotocol Label Switching (MPLS) Forwarding Equivalence Class To Next Hop Label Forwardi

Network Working Group T. Nadeau Request for Comments: 3814 Cisco Systems, Inc. Category: Standards Track C. Srinivasan Bloomberg L.P.

A. Viswanathan Force10 Networks, Inc. June 2004 Multiprotocol Label Switching (MPLS) Forwarding Equivalence

Class To Next Hop Label Forwarding Entry (FEC-To-NHLFE)

Management Information Base (MIB)

Status of this Memo

This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for

improvements. Please refer to the current edition of the "Internet

Official Protocol Standards" (STD 1) for the standardization state

and status of this protocol. Distribution of this memo is unlimited. Copyright Notice

Copyright (C) The Internet Society (2004).

Abstract

This memo defines a portion of the Management Information Base (MIB) for use with network management protocols in the Internet community. In particular, it describes managed objects for defining,

configuring, and monitoring Forwarding Equivalence Class (FEC) to

Next Hop Label Forwarding Entry (NHLFE) mappings and corresponding

actions for use with Multiprotocol Label Switching (MPLS).

Table of Contents

1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 2

2. Terminology. . . . . . . . . . . . . . . . . . . . . . . . . . 3

3. Conventions Used In This Document. . . . . . . . . . . . . . . 3

4. The Internet-Standard Management Framework . . . . . . . . . . 3

5. Outline. . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 5.1. mplsFTNTable . . . . . . . . . . . . . . . . . . . . . . 4 5.1.1. Advantages of Address Ranges Over CIDR Prefixes. 4 5.2. mplsFTNMapTable. . . . . . . . . . . . . . . . . . . . . 5 5.2.1. Indexing Requirements. . . . . . . . . . . . . . 5 5.2.2. How the Current Indexing Works . . . . . . . . . 5

5.3. mplsFTNPerfTable . . . . . . . . . . . . . . . . . . . . 7

6. Avoiding Retrieval-Modification Interactions . . . . . . . . . 7 Nadeau, et al. Standards Track [Page 1]

7. Example Illustrating MIB Module Components . . . . . . . . . . 8 7.1. Sample FTN Rules . . . . . . . . . . . . . . . . . . . . 8 7.2. Creating FTN Entries and Applying them to Interfaces . . 9 7.3. Mapping an FTN Entry to Multiple Interfaces. . . . . . . 10 7.4. Inserting an Entry Into Existing List. . . . . . . . . . 11 7.5. Pictorial Tabular Relationship . . . . . . . . . . . . . 13

7.6. Deleting an Entry. . . . . . . . . . . . . . . . . . . . 14

8. The Use of RowPointer. . . . . . . . . . . . . . . . . . . . . 16

9. MPLS-FTN-STD-MIB Definitions . . . . . . . . . . . . . . . . . 16

10. Security Considerations. . . . . . . . . . . . . . . . . . . . 38

11. IANA Considerations. . . . . . . . . . . . . . . . . . . . . . 39

11.1. IANA Considerations for MPLS-FTN-STD-MIB . . . . . . . . 39

12. References . . . . . . . . . . . . . . . . . . . . . . . . . . 39 12.1. Normative References . . . . . . . . . . . . . . . . . . 39

12.2. Informative References . . . . . . . . . . . . . . . . . 40

13. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 41

14. Authors’ Addresses . . . . . . . . . . . . . . . . . . . . . . 41

15. Full Copyright Statement . . . . . . . . . . . . . . . . . . . 42 1. Introduction

This memo defines a portion of the Management Information Base (MIB) for use with network management protocols in the Internet community. In particular, it describes managed objects for specifying Forwarding Equivalence Class (FEC) to Next Hop Label Forwarding Entry (NHLFE)

mappings and corresponding actions for Multiprotocol Label Switching (MPLS).

At the ingress of an MPLS network, packets entering the MPLS domain

are assigned to an FEC. Those packets belonging to an FEC are

associated with an NHLFE (i.e., MPLS label) via the FEC-to-NHLFE

(FTN) mapping [RFC3031]. This relationship defines how ingress LSRs will impose MPLS labels onto incoming packets. It also defines how

egress LSRs will decapsulate the MPLS shim header from MPLS packets. Conceptually, some of the FTN table functionality could be

implemented using the Forwarding Information Base (FIB) to map all

packets destined for a prefix to an LSP. However, this mapping is

coarse in nature.

Similar functionality is already being used in other contexts such as security filters, access filters, and RSVP flow identification. All of these require various combinations of matching based on IP header and upper-layer header information to identify packets for a

particular treatment. When packets match a particular rule, a

corresponding action is executed on those packets. For example, two popular actions to take when a successful match is identified are

allowing the packet to be forwarded or to discard it. However, other Nadeau, et al. Standards Track [Page 2]

actions are possible, such as modifying the TOS byte, or redirecting a packet to a particular outgoing interface. In the context of MPLS, the possible actions performed by an NHLFE are to redirect packets to either an MPLS Label Switched Path (LSP) or an MPLS Traffic

Engineered (TE) Tunnel.

This document attempts to consolidate the various matching

requirements and associated action options needed for MPLS into a

single specification.

2. Terminology

Although all of the terminology used in this document is either

covered in the MPLS Architecture [RFC3031] or in the SNMP

Architecture [RFC3411], it is informational to define some

immediately pertinent acronyms/terminology here.

MPLS Multiprotocol Label Switching

FEC Forwarding Equivalence Class

NHLFE Next-Hop Label Forwarding Entry

FTN FEC-to-NHLFE

MIB Management Information Base

3. Conventions Used In This Document

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",

"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14, RFC 2119

[RFC2119].

4. The Internet-Standard Management Framework

For a detailed overview of the documents that describe the current

Internet-Standard Management Framework, please refer to section 7 of RFC 3410 [RFC3410].

Managed objects are accessed via a virtual information store, termed the Management Information Base or MIB. MIB objects are generally

accessed through the Simple Network Management Protocol (SNMP).

Objects in the MIB are defined using the mechanisms defined in the

Structure of Management Information (SMI). This memo specifies a MIB module that is compliant to the SMIv2, which is described in STD 58, RFC 2578 [RFC2578], STD 58, RFC 2579 [RFC2579] and STD 58, RFC 2580

[RFC2580].

Nadeau, et al. Standards Track [Page 3]

5. Outline

This MIB module resides on any LSR which does the FEC-to-NHLFE

mapping in order to map traffic into the MPLS domain. This MIB

module consists of three tables:

- mplsFTNTable defines the rule base against which incoming packets are matched and defines the actions to be taken on matching

packets;

- mplsFTNMapTable defines the application of these rules to specific interfaces;

- mplsFTNPerfTable provides performance counters for every entry in mplsFTNTable that is active on one or more interfaces, on a per-

interface basis.

5.1. mplsFTNTable

This table allows FEC to NHLFE mappings to be specified. Each entry in this table (also referred to as an "FTN entry" in this document)

defines a rule to be applied to incoming packets (on interfaces that the entry is activated on using mplsFTNMapTable as explained in

Section 5.2) and an action to be taken on matching packets.

mplsFTNTable allows 6-tuple matching rules based on one or more of

source address range, destination address range, source port range,

destination port range, IPv4 Protocol field [RFC791] or IPv6 next-

header field [RFC2460], and the DiffServ Code Point (DSCP, [RFC2474]) to be specified. Packet redirection is based on an action pointer

which points either at an mplsXCEntry in MPLS-LSR-STD-MIB [RFC3813]

when the NHLFE is a non-TE LSP, or at an mplsTunnelEntry in MPLS-TE- STD-MIB [RFC3812] when the NHLFE is the origin of a TE tunnel.

5.1.1. Advantages of Address Ranges Over CIDR Prefixes

One possible way of specifying a set of addresses as part of an FTN

rule is to use CIDR prefixes [RFC1519]. We have instead chosen to

allow FTN rules to be expressed in terms of address ranges in

mplsFTNTable because they have the following advantages.

- The number of CIDR prefixes needed to represent some address

ranges is very large. For example, we need the following 6 CIDR

prefixes to represent the range of addresses [192.0.2.0-

192.0.2.62]: 192.0.2.0/27, 192.0.2.32/28, 192.0.2.48/29,

192.0.2.56/30, 192.0.2.60/31, and 192.0.2.62/32. A rule such as

"redirect all packets with a source address in the range

[192.0.2.0-192.0.2.62] and destination address in the range

[192.0.2.128-192.0.2.190] to tunnel #2" would require the creation Nadeau, et al. Standards Track [Page 4]

of 36 conceptual rows in mplsFTNTable if the rules were expressed as CIDR prefixes, but only a single conceptual row would be

required if we used address ranges instead.

- Every CIDR prefix can be expressed as a single equivalent address range.

- A particular implementation is free to translate the address

ranges specified in mplsFTNTable internally to equivalent CIDR

prefixes, if it so chooses. However, given that powerful range

matching algorithms are available, many implementations may prefer to implement these directly.

5.2. mplsFTNMapTable

This table provides the capability to activate or map FTN entries

defined in mplsFTNTable to specific interfaces in the system.

Packets received on an interface are compared against FTN entries in the order in which entries are applied to the interface.

5.2.1. Indexing Requirements

The indexing structure of mplsFTNMapTable was designed to satisfy the following requirements.

- We must be able to insert a new entry into an existing list of

entries on an interface with a single SET operation. Thus, we

must be able to support an insertion operation that does not

require manual reindexing of existing entries.

- A management application must be able to traverse entries that

have been applied to a particular interface in the order of

application. The number of (non-bulk) retrieval operations to

obtain this information as dictated by the particular indexing

scheme that we choose for mplsFTNMapTable must be no more than

that dictated by any other indexing scheme. For example, the

indexing scheme must not force the Network Management Application to retrieve all the entries in the table and sift through them

offline to obtain this information.

5.2.2. How the Current Indexing Works

The natural data-structure for implementing constant time insertions between two existing entries and for supporting in-order traversals

is a linked-list.

The chosen indexing structure of mplsFTNMapTable makes the entries in the table behave like items in a linked-list. Each conceptual row Nadeau, et al. Standards Track [Page 5]

has an object, mplsFTNMapPrevIndex, which is a pointer to the

previous entry that is applied to a particular interface. This

object is self-adjusting, i.e., its value is automatically adjusted

by the agent, if necessary, after an insertion or deletion operation. This indexing scheme provides a mechanism to ’insert’ an FTN entry

between two existing entries already applied on an interface. This

is done by specifying the entry after which a new entry should be

inserted in mplsFTNMapPrevIndex.

Using this linked-list structure, one can retrieve FTN entries in the order of application on a per-interface basis as follows:

- To determine the first FTN entry on an interface with index

ifIndex, perform a GETNEXT retrieval operation on

mplsFTNMapRowStatus.ifIndex.0.0; the returned object, if one

exists, is (say) mplsFTNMapRowStatus.ifIndex.0.n

(mplsFTNMapRowStatus is the first accessible columnar object in

the conceptual row). Then, the index of the first FTN entry

applied on this interface is n.

- To determine the FTN entry applied to an interface after the one

indexed by n, perform a GETNEXT retrieval operation on

mplsFTNMapRowStatus.ifIndex.n.0. If such an entry exists, the

returned object would be of the form

mplsFTNMapRowStatus.ifIndex.n.m. Then, the index of the next FTN entry applied on this interface is m.

- If the FTN entry indexed by n is the last entry applied to the

interface with index ifIndex, then the object returned would

either be:

1. mplsFTNMapRowStatus.ifIndexNext.0.k, where ifIndexNext is the

index of the next interface in ifTable to which an FTN entry

has been applied, in which case k is the index of the first FTN entry applied to the interface with index ifIndexNext;

or:

2. mplsFTNMapStorageType.firstIfIndex.0.p, if there are no more

entries in mplsFTNMapTable, where firstIfIndex is the first

entry in ifTable to which an FTN entry has been mapped.

The above steps can be used to retrieve all the applied entries on a per-interface basis in application order. Note that the number of

retrieval operations is equal to the number of applied FTN entries

(i.e., the minimum number of GETNEXT operations needed using any

indexing scheme).

Nadeau, et al. Standards Track [Page 6]

Also note that we could not have created this linked-list structure

using a ’next’ pointer object instead of the ’previous’ pointer

object that we chose because this would not allow us to determine the first FTN entry that has been mapped to a specific interface using a single SNMP (non-bulk) retrieval operation.

The use of this indexing structure is further illustrated using an

example in Section 7.

5.3. mplsFTNPerfTable

If an FTN entry has been applied to one or more interfaces, this

table provides high-capacity performance counters to monitor each

such FTN entry on a per-interface basis.

6. Avoiding Retrieval-Modification Interactions

The problem of an ongoing traversal or retrieval operation on an SNMP table being affected by a concurrent modification operation on that

table is not unique to this MIB module. However, it is useful to

note that a cautious application can keep track of the state of the

modifiable tables in this MIB module using the objects

mplsFTNTableLastChanged and mplsFTNMapTableLastChanged.

For instance, before performing a traversal of mplsFTNMapTable, the

application should retrieve the value of mplsFTNMapTableLastChanged. Each subsequent GETNEXT operation on the table should include this

object as well. For example, GETNEXT(mplsFTNMapTableLastChanged.0,

mplsFTNMapRowStatus.ifIndex.n.0) can be used to:

- Determine the FTN entry after the one indexed by n (in linked-list order) mapped to the interface with index ifIndex, as explained in Section 5.2.2;

- Verify that the value of mplsFTNMapTable has not been modified

during the retrieval process by comparing the value of

mplsFTNMapTableLastChanged retrieved by this operation with the

value retrieved before the traversal was begun.

Using this technique, an application can ensure the validity of the

retrieved information with minimal overhead. This is particularly

important while retrieving information from frequently modified

tables.

Nadeau, et al. Standards Track [Page 7]

7. Example Illustrating MIB Module Components

In this section, we use an example to illustrate how the objects

defined in MPLS-FTN-STD-MIB work together to perform FEC to NHLFE

mapping.

Note that for the various table entries involved in this example, we only show the objects that help illustrate each case.

7.1. Sample FTN Rules

Suppose that we wish to activate the following two FTN rules.

Rule #1: On interface ifIndex = 1, redirect packets with source

IPv4 address matching 192.0.2.63 to an LSP with outgoing

ifIndex = 50 and outgoing label = 150 where the specified LSP is

represented by the following entries in mplsXCTable and

mplsOutSegmentTable.

In mplsXCTable:

{

mplsXCIndex = 0x02,

mplsXCInSegmentIndex = 0x00,

mplsXCOutSegmentIndex = 0x03,

mplsXCLabelStackIndex = 0

}

The value 0x00 for mplsXCInSegmentIndex represents an originating LSP [RFC3813].

In mplsOutSegmentTable:

{

mplsOutSegmentIndex = 0x03,

mplsOutSegmentIfIndex = 50,

mplsOutSegmentPushTopLabel = true,

mplsOutSegmentTopLabel = 150

}

Rule #2: On interface ifIndex = 1, redirect packets with

destination IPv4 addresses in the range [192.0.2.32, 192.0.2.96]

to tunnel #4, where the specified tunnel is represented by the

following entry in mplsTunnelTable:

Nadeau, et al. Standards Track [Page 8]

mplsTunnelIndex = 4,

-- primary tunnel

mplsTunnelInstance = 0,

mplsTunnelIngressLSRID = 192.0.2.1,

mplsTunnelEgressLSRID = 192.0.2.2

}

7.2. Creating FTN Entries and Applying them to Interfaces

The action "redirect packets with source IPv4 address matching

192.0.2.63 to an LSP with outgoing ifIndex = 50 and outgoing label = 150" in Rule #1 can be implemented by the following entry in

mplsFTNTable:

{

mplsFTNIndex = 1,

mplsFTNDescr = "Rule #1",

-- source address only

mplsFTNMask = 0x80,

mplsFTNAddrType = ipv4,

mplsFTNSourceAddrMin = 192.0.2.63,

mplsFTNSourceAddrMax = 192.0.2.63,

mplsFTNActionType = redirectLsp(1),

mplsFTNActionPointer = mplsXCLspId.1.2.1.0.1.3

}

This indicates to which LSP the LSR should redirect packets by

setting mplsFTNActionPointer to the first accessible columnar object instance in mplsXCEntry that corresponds of the LSP to use, in this

case mplsXCLspId.1.2.1.0.1.3.

This action is then activated on "interface ifIndex = 1" by the

following entry in mplsFTNMapTable to complete the implementation of Rule #1:

{

-- apply rule to interface ifIndex = 1

mplsFTNMapIndex = 1,

-- first FTN entry on this interface

mplsFTNPrevIndex = 0,

-- index of current entry in mplsFTNTable, i.e., Rule #1

mplsFTNMapCurrIndex = 1

}

The action "redirect packets with destination IPv4 addresses in the

range [192.0.2.32, 192.0.2.96] to tunnel #4" in Rule #2 can be

implemented by the following entry in mplsFTNTable:

Nadeau, et al. Standards Track [Page 9]

mplsFTNIndex = 2,

mplsFTNDescr = "Rule #2",

-- destination address only

mplsFTNMask = 0x40,

mplsFTNAddrType = ipv4,

mplsFTNDestAddrMin = 192.0.2.32,

mplsFTNDestAddrMax = 192.0.2.96,

mplsFTNActionType = redirectTunnel(2),

mplsFTNActionPointer = mplsTunnelName.4.0.3221225985.3221225986 }

where 3221225985 and 3221225986 are representations of the addresses 192.0.2.1 and 192.0.2.2, respectively, as Unsigned32 (the underlying data type) entities.

This rule needs to be activated on "interface ifIndex = 1" after Rule #1 which was previously activated on this interface. This is done by the following entry in mplsFTNMapTable to complete the implementation of Rule #2:

{

-- apply rule to interface ifIndex = 1

mplsFTNMapIndex = 1,

-- insert after Rule #1 (mplsFTNIndex = 1)

mplsFTNPrevIndex = 1,

-- index of current entry in mplsFTNTable, i.e., Rule #2

mplsFTNMapCurrIndex = 2

}

7.3. Mapping an FTN Entry to Multiple Interfaces

Suppose we now wish to activate the following rule:

Rule #2b: On interface ifIndex = 2, redirect packets with

destination IPv4 addresses in the range [192.0.2.32, 192.0.2.96]

to tunnel #4.

Notice that the FEC and corresponding action associated with this

rule (i.e., "redirect packets with destination IPv4 addresses in the range [192.0.2.32, 192.0.2.96] to tunnel #4") are the same as that

associated with Rule #2. Hence, we can reuse the existing entry with mplsFTNIndex = 2 from mplsFTNTable.

However, we have to create the following new entry in mplsFTNMapTable to activate this FTN entry as the first one on the interface with

ifIndex = 2.

Nadeau, et al. Standards Track [Page 10]

{

-- apply rule to interface ifIndex = 2

mplsFTNMapIndex = 2,

-- first FTN entry on this interface

mplsFTNPrevIndex = 0,

-- index of current entry in mplsFTNTable

mplsFTNMapCurrIndex = 2

}

7.4. Inserting an Entry Into Existing List

At a later point, suppose that we wish to introduce the following

Rule between Rules #1 and #2.

Rule #3: On interface ifIndex = 1, redirect all packets with

destination IPv4 address matching the prefix 192.0.2.32/28 to

tunnel #3, where the tunnel we wish to redirect traffic to is

represented by the following entry in mplsTunnelTable:

{

mplsTunnelIndex = 3,

-- primary tunnel

mplsTunnelInstance = 0,

mplsTunnelIngressLSRID = 192.0.2.3,

mplsTunnelEgressLSRID = 192.0.2.4

}

Note that the ordering of the rules on a particular interface is

critical since the range of addresses specified in Rule #3 is a

subset of the ones specified in Rule #2.

Without the linked-list style insertion feature supported by

mplsFTNMapTable, we would possibly have had to reindex existing

entries (or plan for such changes by leaving sufficient gaps between indexes, something that only postpones the problem). With the

existing tables, we solve this problem by creating the following

entries.

We implement the phrase "redirect all packets with destination IPv4

address matching the prefix 1.4.0.0/16 to tunnel #3" in Rule #3 by

creating the following entry in mplsFTNTable:

Nadeau, et al. Standards Track [Page 11]

{

mplsFTNIndex = 3,

mplsFTNDescr = "Rule #3",

-- destination address only

mplsFTNMask = 0x40,

mplsFTNAddrType = ipv4,

-- address range equivalent to CIDR prefix 192.0.2.32/28

mplsFTNDestAddrMin = 192.0.2.32,

mplsFTNDestAddrMax = 192.0.2.47,

mplsFTNActionType = redirectTunnel,

mplsFTNActionPointer = mplsTunnelName.3.0.3221225987.3221225988 }

where 3221225987 and 3221225988 are representations of the addresses 192.0.2.3 and 192.0.2.4, respectively, as Unsigned32 (the underlying data type) entities.

We next insert this rule in mplsFTNMapTable just after Rule #1 as

follows:

{

-- apply rule to interface ifIndex = 1

mplsFTNMapIndex = 1,

-- insert after Rule #1 (mplsFTNIndex = 1)

mplsFTNPrevIndex = 1,

-- index of current entry in mplsFTNTable i.e., Rule #3

mplsFTNMapCurrIndex = 3

}

After the insertion of Rule #3 in mplsFTNMapTable, the ’previous’

pointer object mplsFTNMapPrevIndex of the next entry (corresponding

to Rule #2) adjusts automatically to point to this entry.

Note that, of the existing entries in the table, the only one that is impacted by an insertion operation is the entry on that particular

interface immediately after the newly inserted one, if one exists.

None of the other entries in mplsFTNMapTable are impacted. For

instance, in this particular example, when the entry for Rule #3 was inserted between those for Rules #1 and #2, the entries for Rules #1 and #2b were not impacted.

Nadeau, et al. Standards Track [Page 12]

7.5. Pictorial Tabular Relationship

At this point, the relationship between different table entries can

be represented pictorially as follows. For each conceptual row

instance, we show the table that it belongs to, along with its

indices in parentheses. (Note that various conceptual rows are

depicted in a way that is convenient for showing the

interrelationships and are not necessarily in lexicographical order.) ifTable, The Interfaces Group MIB [RFC2863]:

+-> ifEntry (1)

| (ifIndex = 1)

|

| mplsFTNMapTable:

| mplsFTNMapEntry (1.0.1): <--------------------+

+<-- (mplsFTNMapIndex = 1, |

| mplsFTNMapPrevIndex = 0, ---> (NULL) |

| mplsFTNMapCurrIndex = 1) ------------+ |

| | |

| mplsFTNMapEntry (1.1.3): <------------------+ |

+<-- (mplsFTNMapIndex = 1, | | |

| mplsFTNMapPrevIndex = 1, ----------->+ | |

| mplsFTNMapCurrIndex = 3) ---------+ | | |

| | | | |

| mplsFTNMapEntry (1.3.2): <----------------+ | |

+<-- (mplsFTNMapIndex = 1, | | | | |

mplsFTNMapPrevIndex = 3, -------->+ | | | |

mplsFTNMapCurrIndex = 2) ----+ | | | | |

| | | | | |

mplsFTNTable: | | | | | |

mplsFTNEntry (2): | | | | | |

+--> (mplsFTNIndex = 2) <----------+ | | | | |

| | | | | |

| mplsFTNEntry (3): | | | | |

| (mplsFTNIndex = 3) <---------------+ | | | |

| | | | |

| mplsFTNEntry (1): | | | |

| (mplsFTNIndex = 1) <------------------+ | | |

| | | |

| mplsFTNPerfTable: | | |

| mplsFTNPerfEntry (1.2): | | |

| (mplsFTNPerfIndex = 1, | | |

| mplsFTNPerfCurrIndex = 2) --------------+ | |

| | |

| mplsFTNPerfEntry (1.3): | |

| (mplsFTNPerfIndex = 1, | |

| mplsFTNPerfCurrIndex = 3) ---------------+ |

| |

Nadeau, et al. Standards Track [Page 13]

| mplsFTNPerfEntry (1.1): |

| (mplsFTNPerfIndex = 1, |

| mplsFTNPerfCurrIndex = 1) ------------------+

|

| mplsFTNPerfEntry (2.2):

| (mplsFTNPerfIndex = 2,

| mplsFTNPerfCurrIndex = 2) ------------------+

| |

| ifTable, The Interfaces Group MIB [RFC2863]: |

+---> ifEntry (2): |

| | (ifIndex = 2) |

| | |

| | mplsFTNMapEntry (2.1.2): <--------------------+

+----- (mplsFTNMapIndex = 2

| mplsFTNMapPrevIndex = 0 ---> (NULL)

+---- mplsFTNMapCurrIndex = 2)

7.6. Deleting an Entry

Let us next look at how we can remove the recently applied Rule #3

and how the existing conceptual rows behave in this situation.

The conceptual row corresponding to the application of Rule #3 to

interface ifIndex = 1 has the following index values: mplsFTNMapIndex = 1, mplsFTNMapPrevIndex = 1, and mplsFTNMapCurrIndex = 3. To delete this conceptual row, the Network Management Application performs a

SET operation setting the object instance mplsFTNMapRowStatus.1.1.3

to the value destroy(6). The agent then destroys this conceptual

row. It also automatically adjusts the object instance of

mplsFTNMapPrevIndex corresponding to Rule #2 from the value 3 (i.e., pointing to the recently destroyed Rule #3) to the value 1 (i.e., to Rule #1).

At this point, the rules applied to interface ifIndex = 1 are Rule #1 and Rule #2, in that order. The relationship between different table entries can be represented pictorially as follows.

Nadeau, et al. Standards Track [Page 14]

ifTable, The Interfaces Group MIB [RFC2863]:

+-> ifEntry (1)

| (ifIndex = 1)

|

| mplsFTNMapTable:

| mplsFTNMapEntry (1.0.1): <--------------------+

+<-- (mplsFTNMapIndex = 1, |

| mplsFTNMapPrevIndex = 0, ---> (NULL) |

| mplsFTNMapCurrIndex = 1) ------------+ |

| | |

| mplsFTNMapEntry (1.1.2): <----------------+ |

+<-- (mplsFTNMapIndex = 1, | | |

mplsFTNMapPrevIndex = 1, ------------+ | |

mplsFTNMapCurrIndex = 2) ----+ | | |

| | | |

mplsFTNTable: | | | |

mplsFTNEntry (2): | | | |

+--> (mplsFTNIndex = 2) <----------+ | | |

| | | |

| mplsFTNEntry (3): | | |

| (mplsFTNIndex = 3) | | |

| | | |

| mplsFTNEntry (1): | | |

| (mplsFTNIndex = 1) <------------------+ | |

| | |

| mplsFTNPerfTable: | |

| mplsFTNPerfEntry (1.2): | |

| (mplsFTNPerfIndex = 1, | |

| mplsFTNPerfCurrIndex = 2) --------------+ |

| |

| mplsFTNPerfEntry (1.1): |

| (mplsFTNPerfIndex = 1, |

| mplsFTNPerfCurrIndex = 1) ------------------+

|

| mplsFTNPerfEntry (2.2):

| (mplsFTNPerfIndex = 2,

| mplsFTNPerfCurrIndex = 2) ------------------+

| |

| ifTable, The Interfaces Group MIB [RFC2863]: |

+---> ifEntry (2): |

| | (ifIndex = 2) |

| | |

| | mplsFTNMapEntry (2.1.2): <--------------------+

+----- (mplsFTNMapIndex = 2

| mplsFTNMapPrevIndex = 0 ---> (NULL)

+---- mplsFTNMapCurrIndex = 2)

Nadeau, et al. Standards Track [Page 15]

Note that the FTN entry for Rule #3 still exists in mplsFTNTable at

this point but is not referenced by any conceptual row in

mplsFTNMapTable or mplsFTNPerfTable.

Also note that the deletion of an entry from mplsFTNMapTable only

impacts the entry on that particular interface immediately after the deleted entry, if one exists. None of the other conceptual rows in

mplsFTNMapTable are impacted. For instance, in this particular

example, when the entry for Rule #3 was deleted, the entries for

Rules #1 and #2b were not impacted.

8. The Use of RowPointer

RowPointer is a textual convention used to identify a conceptual row in a conceptual table in a MIB by pointing to the first accessible

object. In this MIB module, in mplsFTNTable, the RowPointer object

mplsFTNActionPointer indicates the LSP or TE Tunnel to redirect

packets matching an FTN entry to. This object MUST point to the

first instance of the first accessible columnar object in the

appropriate conceptual row in order to allow the manager to find the appropriate corresponding entry in either MPLS-LSR-STD-MIB [RFC3813] or MPLS-TE-STD-MIB [RFC3812]. If this object returns zeroDotZerok,

it implies that there is no currently defined action that is

associated with that particular FTN entry.

9. MPLS-FTN-STD-MIB Definitions

MPLS-FTN-STD-MIB DEFINITIONS ::= BEGIN

IMPORTS

MODULE-IDENTITY, OBJECT-TYPE, Unsigned32, Counter64, Integer32

FROM SNMPv2-SMI -- [RFC2578] RowStatus, StorageType, RowPointer,

TEXTUAL-CONVENTION, TimeStamp

FROM SNMPv2-TC -- [RFC2579] MODULE-COMPLIANCE, OBJECT-GROUP

FROM SNMPv2-CONF -- [RFC2580] InterfaceIndexOrZero,

ifGeneralInformationGroup, ifCounterDiscontinuityGroup

FROM IF-MIB -- [RFC2863] SnmpAdminString

FROM SNMP-FRAMEWORK-MIB -- [RFC3411] Dscp

FROM DIFFSERV-DSCP-TC -- [RFC3289] InetAddressType, InetAddress, InetPortNumber

FROM INET-ADDRESS-MIB -- [RFC3291] mplsStdMIB

FROM MPLS-TC-STD-MIB -- [RFC3811] Nadeau, et al. Standards Track [Page 16]

;

mplsFTNStdMIB MODULE-IDENTITY

LAST-UPDATED "200406030000Z" -- June 6, 2004

ORGANIZATION "Multiprotocol Label Switching (MPLS) Working Group" CONTACT-INFO

"

Thomas D. Nadeau

Postal: Cisco Systems, Inc.

250 Apollo Drive

Chelmsford, MA 01824

Tel: +1-978-244-3051

Email: tnadeau@https://www.doczj.com/doc/6a11894043.html,

Cheenu Srinivasan

Postal: Bloomberg L.P.

499 Park Avenue

New York, NY 10022

Tel: +1-212-893-3682

Email: cheenu@https://www.doczj.com/doc/6a11894043.html,

Arun Viswanathan

Postal: Force10 Networks, Inc.

1440 McCarthy Blvd

Milpitas, CA 95035

Tel: +1-408-571-3516

Email: arunv@https://www.doczj.com/doc/6a11894043.html,

IETF MPLS Working Group email: mpls@https://www.doczj.com/doc/6a11894043.html,"

DESCRIPTION

"Copyright (C) The Internet Society (2004). The

initial version of this MIB module was published

in RFC 3814. For full legal notices see the RFC

itself or see:

https://www.doczj.com/doc/6a11894043.html,/copyrights/ianamib.html

This MIB module contains managed object definitions for

specifying FEC to NHLFE (FTN) mappings and corresponding

performance for MPLS."

-- Revision history.

REVISION

"200406030000Z" -- June 3, 2004

DESCRIPTION

"Initial version issued as part of RFC 3814."

Nadeau, et al. Standards Track [Page 17]

::= { mplsStdMIB 8 }

-- TEXTUAL-CONVENTIONs used in this MIB.

MplsFTNEntryIndex ::= TEXTUAL-CONVENTION

STATUS current

DESCRIPTION

"Index for an entry in mplsFTNTable."

SYNTAX Unsigned32 (1..4294967295)

MplsFTNEntryIndexOrZero ::= TEXTUAL-CONVENTION

STATUS current

DESCRIPTION

"Index for an entry in mplsFTNTable or the special value

zero. The value zero is object-specific and must

therefore be defined as part of the description of any

object which uses this syntax. Examples of the usage

of zero might include situations when none or all

entries in mplsFTNTable need to be referenced."

SYNTAX Unsigned32 (0..4294967295)

-- Top-Level Components of this MIB.

mplsFTNNotifications OBJECT IDENTIFIER ::= { mplsFTNStdMIB 0 }

mplsFTNObjects OBJECT IDENTIFIER ::= { mplsFTNStdMIB 1 }

mplsFTNConformance OBJECT IDENTIFIER ::= { mplsFTNStdMIB 2 }

-- Next free index in mplsFTNTable.

mplsFTNIndexNext OBJECT-TYPE

SYNTAX MplsFTNEntryIndexOrZero

MAX-ACCESS read-only

STATUS current

DESCRIPTION

"This object contains the next available valid value to

be used for mplsFTNIndex when creating entries in the

mplsFTNTable.

When creating a new conceptual row (configuration

entry) in mplsFTNTable with an SNMP SET operation the

command generator (Network Management Application) must

first issue a management protocol retrieval operation

to obtain the current value of this object.

If the command responder (agent) does not wish to allow

creation of more entries in mplsFTNTable, possibly

because of resource exhaustion, this object MUST return

a value of 0.

If a non-zero value is returned the Network Management Nadeau, et al. Standards Track [Page 18]

Application must determine whether the value is indeed

still unused since two Network Management Applications

may attempt to create a row simultaneously and use the

same value.

If it is currently unused and the SET succeeds, the

agent MUST change the value of this object to a

currently unused non-zero value (according to an

implementation specific algorithm) or zero (if no

further row creation will be permitted).

If the value is in use, however, the SET fails and the

Network Management Application must then reread this

object to obtain a new usable value."

::= { mplsFTNObjects 1 }

-- Last time an object in mplsFTNTable changed.

mplsFTNTableLastChanged OBJECT-TYPE

SYNTAX TimeStamp

MAX-ACCESS read-only

STATUS current

DESCRIPTION

"Indicates the last time an entry was added, deleted or

modified in mplsFTNTable. Management stations should

consult this object to determine if mplsFTNTable

requires their attention. This object is particularly

useful for applications performing a retrieval on

mplsFTNTable to ensure that the table is not modified

during the retrieval operation."

::= { mplsFTNObjects 2 }

-- Table of FTN entries.

mplsFTNTable OBJECT-TYPE

SYNTAX SEQUENCE OF MplsFTNEntry

MAX-ACCESS not-accessible

STATUS current

DESCRIPTION

"This table contains the currently defined FTN entries.

This table allows FEC to NHLFE mappings to be

specified. Each entry in this table defines a rule to

be applied to incoming packets (on interfaces that the

FTN entry is activated on using mplsFTNMapTable) and an

action to be taken on matching packets

(mplsFTNActionPointer).

This table supports 6-tuple matching rules based on one

or more of source address range, destination address

range, source port range, destination port range, IPv4 Nadeau, et al. Standards Track [Page 19]

Protocol field or IPv6 next-header field and the

DiffServ Code Point (DSCP) to be specified.

The action pointer points either to instance of

mplsXCEntry in MPLS-LSR-STD-MIB when the NHLFE is a non-

TE LSP, or to an instance of mplsTunnelEntry in the

MPLS-TE-STD-MIB when the NHLFE is an originating TE

tunnel."

REFERENCE

"J. Postel, Internet Protocol, RFC 791, STD 5, September

1981

Deering, S., and R. Hinden, Internet Protocol, Version

6 (IPv6) Specification, RFC 2460, December 1998

Nichols, K, Blake, S., Baker, F. and D. Black,

Definition of the Differentiated Services Field (DS

Field) in the IPv4 and IPv6 Headers, RFC 2474, December

1998

Srinivasan, C., A. Viswanathan, and T. Nadeau, MPLS

Label Switch Router Management Information Base,

RFC 3813

Srinivasan, C., A. Viswanathan, and T. Nadeau, MPLS

Traffic Engineering Management Information Base,

RFC 3812"

::= { mplsFTNObjects 3 }

mplsFTNEntry OBJECT-TYPE

SYNTAX MplsFTNEntry

MAX-ACCESS not-accessible

STATUS current

DESCRIPTION

"Each entry represents one FTN entry which defines a

rule to compare incoming packets with and an action to

be taken on matching packets."

INDEX { mplsFTNIndex }

::= { mplsFTNTable 1 }

MplsFTNEntry ::= SEQUENCE {

mplsFTNIndex MplsFTNEntryIndex,

mplsFTNRowStatus RowStatus,

mplsFTNDescr SnmpAdminString,

mplsFTNMask BITS,

mplsFTNAddrType InetAddressType,

mplsFTNSourceAddrMin InetAddress,

mplsFTNSourceAddrMax InetAddress,

Nadeau, et al. Standards Track [Page 20]

(完整版)MATLAB常用函数大全

一、MATLAB常用的基本数学函数 abs(x):纯量的绝对值或向量的长度 angle(z):复数z的相角(Phase angle) sqrt(x):开平方 real(z):复数z的实部 imag(z):复数z的虚部 conj(z):复数z的共轭复数 round(x):四舍五入至最近整数 fix(x):无论正负,舍去小数至最近整数 floor(x):地板函数,即舍去正小数至最近整数ceil(x):天花板函数,即加入正小数至最近整数rat(x):将实数x化为分数表示 rats(x):将实数x化为多项分数展开 sign(x):符号函数(Signum function)。 当x<0时,sign(x)=-1; 当x=0时,sign(x)=0; 当x>0时,sign(x)=1。 rem(x,y):求x除以y的馀数 gcd(x,y):整数x和y的最大公因数 lcm(x,y):整数x和y的最小公倍数 exp(x):自然指数 pow2(x):2的指数 log(x):以e为底的对数,即自然对数或 log2(x):以2为底的对数 log10(x):以10为底的对数 二、MATLAB常用的三角函数 sin(x):正弦函数 cos(x):余弦函数

tan(x):正切函数 asin(x):反正弦函数 acos(x):反馀弦函数 atan(x):反正切函数 atan2(x,y):四象限的反正切函数 sinh(x):超越正弦函数 cosh(x):超越馀弦函数 tanh(x):超越正切函数 asinh(x):反超越正弦函数 acosh(x):反超越馀弦函数 atanh(x):反超越正切函数 三、适用於向量的常用函数有: min(x): 向量x的元素的最小值 max(x): 向量x的元素的最大值 mean(x): 向量x的元素的平均值 median(x): 向量x的元素的中位数 std(x): 向量x的元素的标准差 diff(x): 向量x的相邻元素的差 sort(x): 对向量x的元素进行排序(Sorting)length(x): 向量x的元素个数 norm(x): 向量x的欧氏(Euclidean)长度sum(x): 向量x的元素总和 prod(x): 向量x的元素总乘积 cumsum(x): 向量x的累计元素总和cumprod(x): 向量x的累计元素总乘积 dot(x, y): 向量x和y的内积 cross(x, y): 向量x和y的外积 四、MATLAB的永久常数

matlab 常用函数汇总

matlab 常用函数汇总 编程2008-07-10 21:45:20 阅读46 评论0 字号:大中小订阅matlab常用函数 图形注释 Title 图形标题 Xlabel X轴标记 Ylabel Y轴标记 Text 文本注释 Gtext 用鼠标放置文本 Grid 网格线 MATLAB编程语言 Function 增加新的函数 Eval 执行由MA TLAB表达式构成的字串 Feval 执行由字串指定的函数 Global 定义全局变量 程序控制流 If 条件执行语句 Else 与if命令配合使用 Elseif 与if命令配合使用 End For,while和if语句的结束 For 重复执行指定次数(循环) While 重复执行不定次数(循环) Break 终止循环的执行 Return 返回引用的函数 Error 显示信息并终止函数的执行 交互输入 Input 提示用户输入 Keyboard 像底稿文件一样使用键盘输入 Menu 产生由用户输入选择的菜单 Pause 等待用户响应 Uimenu 建立用户界面菜单 Uicontrol 建立用户界面控制 一般字符串函数 Strings MATLAB中有关字符串函数的说明 Abs 变字符串为数值 Setstr 变数值为字符串 Isstr 当变量为字符串时其值为真 Blanks 空串 Deblank 删除尾部的空串 Str2mat 从各个字符串中形成文本矩阵 Eval 执行由MA TLAB表达式组成的串 字符串比较 Strcmp , , , 比较字符串 Findstr 在一字符串中查找另一个子串

Upper 变字符串为大写 Lower 变字符串为小写 Isletter 当变量为字母时,其值为真 Isspace 当变量为空白字符时,其值为真 字符串与数值之间变换 Num2str 变数值为字符串 Int2str 变整数为字符串 Str2num 变字符串为数值 Sprintf 变数值为格式控制下的字符串 Sscanf 变字符串为格式控制下的数值 十进制与十六进制数之间变换 Hex2num 变十六进制为IEEE标准下的浮点数Hex2dec 变十六制数为十进制数 Dec2hex 变十进制数为十六进制数 建模 Append 追加系统动态特性 Augstate 变量状态作为输出 Blkbuild 从方框图中构造状态空间系统Cloop 系统的闭环 Connect 方框图建模 Conv 两个多项式的卷积 Destim 从增益矩阵中形成离散状态估计器Dreg 从增益矩阵中形成离散控制器和估计器Drmodel 产生随机离散模型 Estim 从增益矩阵中形成连续状态估计器Feedback 反馈系统连接 Ord2 产生二阶系统的A、B、C、D Pade 时延的Pade近似 Parallel 并行系统连接 Reg 从增益矩阵中形成连续控制器和估计器Rmodel 产生随机连续模型 Series 串行系统连接 Ssdelete 从模型中删除输入、输出或状态ssselect 从大系统中选择子系统 模型变换 C2d 变连续系统为离散系统 C2dm 利用指定方法变连续为离散系统 C2dt 带一延时变连续为离散系统 D2c 变离散为连续系统 D2cm 利用指定方法变离散为连续系统 Poly 变根值表示为多项式表示 Residue 部分分式展开 Ss2tf 变状态空间表示为传递函数表示 Ss2zp 变状态空间表示为零极点表示

(完整版)matlab函数大全最完整版

MATLAB函数大全 Matlab有没有求矩阵行数/列数/维数的函数? ndims(A)返回A的维数 size(A)返回A各个维的最大元素个数 length(A)返回max(size(A)) [m,n]=size(A)如果A是二维数组,返回行数和列数nnz(A)返回A中非0元素的个数 MATLAB的取整函数:fix(x), floor(x) :,ceil(x) , round(x) (1)fix(x) : 截尾取整. >> fix( [3.12 -3.12]) ans = 3 -3 (2)floor(x):不超过x 的最大整数.(高斯取整) >> floor( [3.12 -3.12]) ans =

3 -4 (3)ceil(x) : 大于x 的最小整数>> ceil( [3.12 -3.12]) ans = 4 -3 (4)四舍五入取整 >> round(3.12 -3.12) ans = >> round([3.12 -3.12]) ans =

3 -3 >> 如何用matlab生成随机数函数 rand(1) rand(n):生成0到1之间的n阶随机数方阵rand(m,n):生成0到1之间的m×n的随机数矩阵(现成的函数) 另外: Matlab随机数生成函数 betarnd 贝塔分布的随机数生成器 binornd 二项分布的随机数生成器 chi2rnd 卡方分布的随机数生成器 exprnd 指数分布的随机数生成器 frnd f分布的随机数生成器 gamrnd 伽玛分布的随机数生成器 geornd 几何分布的随机数生成器 hygernd 超几何分布的随机数生成器

MATLAB中常用的函数

[转]MATLAB 主要函数(一) (2008-05-11 17:09:43) 转载 标签: 分类:IT matlab 函数 杂谈 MATLAB主要函数指令表(按功能分类)原贴地址:https://www.doczj.com/doc/6a11894043.html,/casularm/archive/2007/04/20/1572638.aspx 1常用指令(General Purpose Commands) 1.1通用信息查询(General information) demo 演示程序 help 在线帮助指令 helpbrowser 超文本文档帮助信息 helpdesk 超文本文档帮助信息 helpwin 打开在线帮助窗 info MATLAB 和MathWorks 公司的信息 subscribe MATLAB 用户注册 ver MATLAB 和TOOLBOX 的版本信息 version MATLAB 版本 whatsnew 显示版本新特征 1.2工作空间管理(Managing the workspace) clear 从内存中清除变量和函数 exit 关闭MATLAB load 从磁盘中调入数据变量 pack 合并工作内存中的碎块 quit 退出MATLAB save 把内存变量存入磁盘 who 列出工作内存中的变量名

whos 列出工作内存中的变量细节 workspace 工作内存浏览器 1.3管理指令和函数(Managing commands and functions) edit 矩阵编辑器 edit 打开M 文件 inmem 查看内存中的P 码文件 mex 创建MEX 文件 open 打开文件 pcode 生成P 码文件 type 显示文件内容 what 列出当前目录上的M、MAT、MEX 文件 which 确定指定函数和文件的位置 1.4搜索路径的管理(Managing the seach patli) addpath 添加搜索路径 rmpath 从搜索路径中删除目录 path 控制MATLAB 的搜索路径 pathtool 修改搜索路径 1.5指令窗控制(Controlling the command window) beep 产生beep 声 echo 显示命令文件指令的切换开关 diary 储存MATLAB 指令窗操作内容 format 设置数据输出格式 more 命令窗口分页输出的控制开关 1.6操作系统指令(Operating system commands) cd 改变当前工作目录 computer 计算机类型 copyfile 文件拷贝 delete 删除文件 dir 列出的文件 dos 执行dos 指令并返还结果

Matlab中常用的函数集

sort (排序) xlsread ( exl文件导入) load (txt 文件,mat文件等导入) 附录Ⅰ工具箱函数汇总 Ⅰ.1 统计工具箱函数 表Ⅰ-1 概率密度函数 函数名对应分布的概率密度函数 betapdf 贝塔分布的概率密度函数 binopdf 二项分布的概率密度函数 chi2pdf 卡方分布的概率密度函数 exppdf 指数分布的概率密度函数 fpdf f分布的概率密度函数 gampdf 伽玛分布的概率密度函数 geopdf 几何分布的概率密度函数 hygepdf 超几何分布的概率密度函数normpdf 正态(高斯)分布的概率密度函数lognpdf 对数正态分布的概率密度函数nbinpdf 负二项分布的概率密度函数 ncfpdf 非中心f分布的概率密度函数nctpdf 非中心t分布的概率密度函数 ncx2pdf 非中心卡方分布的概率密度函数poisspdf 泊松分布的概率密度函数 raylpdf 雷利分布的概率密度函数 tpdf 学生氏t分布的概率密度函数unidpdf 离散均匀分布的概率密度函数unifpdf 连续均匀分布的概率密度函数weibpdf 威布尔分布的概率密度函数 表Ⅰ-2 累加分布函数 函数名对应分布的累加函数 betacdf 贝塔分布的累加函数 binocdf 二项分布的累加函数 chi2cdf 卡方分布的累加函数 expcdf 指数分布的累加函数 fcdf f分布的累加函数 gamcdf 伽玛分布的累加函数 geocdf 几何分布的累加函数 hygecdf 超几何分布的累加函数

logncdf 对数正态分布的累加函数 nbincdf 负二项分布的累加函数 ncfcdf 非中心f分布的累加函数 nctcdf 非中心t分布的累加函数 ncx2cdf 非中心卡方分布的累加函数 normcdf 正态(高斯)分布的累加函数 poisscdf 泊松分布的累加函数 raylcdf 雷利分布的累加函数 tcdf 学生氏t分布的累加函数 unidcdf 离散均匀分布的累加函数 unifcdf 连续均匀分布的累加函数 weibcdf 威布尔分布的累加函数 表Ⅰ-3 累加分布函数的逆函数 函数名对应分布的累加分布函数逆函数 betainv 贝塔分布的累加分布函数逆函数 binoinv 二项分布的累加分布函数逆函数 chi2inv 卡方分布的累加分布函数逆函数 expinv 指数分布的累加分布函数逆函数 finv f分布的累加分布函数逆函数 gaminv 伽玛分布的累加分布函数逆函数 geoinv 几何分布的累加分布函数逆函数hygeinv 超几何分布的累加分布函数逆函数logninv 对数正态分布的累加分布函数逆函数nbininv 负二项分布的累加分布函数逆函数ncfinv 非中心f分布的累加分布函数逆函数nctinv 非中心t分布的累加分布函数逆函数 ncx2inv 非中心卡方分布的累加分布函数逆函数icdf norminv 正态(高斯)分布的累加分布函数逆函数poissinv 泊松分布的累加分布函数逆函数 raylinv 雷利分布的累加分布函数逆函数 tinv 学生氏t分布的累加分布函数逆函数unidinv 离散均匀分布的累加分布函数逆函数unifinv 连续均匀分布的累加分布函数逆函数weibinv 威布尔分布的累加分布函数逆函数 表Ⅰ-4 随机数生成器函数

MatLab常用函数大全

1、求组合数 C,则输入: 求k n nchoosek(n,k) 例:nchoosek(4,2) = 6. 2、求阶乘 求n!.则输入: Factorial(n). 例:factorial(5) = 120. 3、求全排列 perms(x). 例:求x = [1,2,3]; Perms(x),输出结果为: ans = 3 2 1 3 1 2 2 3 1 2 1 3 1 2 3 1 3 2 4、求指数 求a^b:Power(a,b) ; 例:求2^3 ; Ans = pow(2,3) ; 5、求行列式 求矩阵A的行列式:det(A); 例:A=[1 2;3 4] ; 则det(A) = -2 ; 6、求矩阵的转置 求矩阵A的转置矩阵:A’ 转置符号为单引号. 7、求向量的指数 求向量p=[1 2 3 4]'的三次方:p.^3 例: p=[1 2 3 4]' A=[p,p.^2,p.^3,p.^4] 结果为:

注意:在p 与符号”^”之间的”.”不可少. 8、求自然对数 求ln(x):Log(x) 例:log(2) = 0.6931 9、求矩阵的逆矩阵 求矩阵A 的逆矩阵:inv(A) 例:a= [1 2;3 4]; 则 10、多项式的乘法运算 函数conv(p1,p2)用于求多项式p1和p2的乘积。这里,p1、p2是两个多项式系数向量。 例2-2 求多项式43810x x +-和223x x -+的乘积。 命令如下: p1=[1,8,0,0,-10]; p2=[2,-1,3]; c=conv(p1,p2) 11、多项式除法 函数[q ,r]=deconv(p1,p2)用于多项式p1和p2作除法运算,其中q 返回多项式p1除以p2的商式,r 返回p1除以p2的余式。这里,q 和r 仍是多项式系数向量。 例2-3 求多项式43810x x +-除以多项式223x x -+的结果。 命令如下: p1=[1,8,0,0,-10]; p2=[2,-1,3]; [q,r]=deconv(p1,p2) 12、求一个向量的最大值 求一个向量x 的最大值的函数有两种调用格式,分别是:

matlab中常用的函数

A abs 绝对值、模、字符的ASCII码值 acos 反余弦 acosh 反双曲余弦 acot 反余切 acoth 反双曲余切 acsc 反余割 acsch 反双曲余割 align 启动图形对象几何位置排列工具 all 所有元素非零为真 angle 相角 ans 表达式计算结果的缺省变量名any 所有元素非全零为真area 面域图 argnames 函数M文件宗量名asec 反正割 asech 反双曲正割 asin 反正弦 asinh 反双曲正弦 assignin 向变量赋值 atan 反正切 atan2 四象限反正切 atanh 反双曲正切 autumn 红黄调秋色图阵axes 创建轴对象的低层指令axis 控制轴刻度和风格的高层指令 B bar 二维直方图 bar3 三维直方图 bar3h 三维水平直方图barh 二维水平直方图 base2dec X进制转换为十进制bin2dec 二进制转换为十进制blanks 创建空格串 bone 蓝色调黑白色图阵box 框状坐标轴 break while 或for 环中断指令brighten 亮度控制 C capture ;3版以前?捕获当前图形cart2pol 直角坐标变为极或柱坐标cart2sph 直角坐标变为球坐标cat 串接成高维数组 caxis 色标尺刻度 cd 指定当前目录 cdedit 启动用户菜单、控件回调函数设计工具 cdf2rdf 复数特征值对角阵转为实数块对角阵 ceil 向正无穷取整 cell 创建元胞数组 cell2struct 元胞数组转换为构架数组celldisp 显示元胞数组内容cellplot 元胞数组内部结构图示char 把数值、符号、内联类转换为字符对象 chi2cdf 分布累计概率函数 chi2inv 分布逆累计概率函数chi2pdf 分布概率密度函数 chi2rnd 分布随机数发生器 chol Cholesky分解

MATLAB常用函数

1概述安装介绍(略)。 2 矩阵和数组 2.1 创建特殊矩阵函数 Compan 伴随矩阵Diag 对角矩阵Eye 单位矩阵Gallery 测试矩阵Hadamard hadamard矩阵Hilb hilb矩阵Invhilb invhilb矩阵 Magic魔方矩阵Ones 全一矩阵Rand均匀分布随机矩阵 Randn 正态分布随机矩阵Rosser经典对称特征测试矩阵 Wilkinson wilkinson特征值测试矩阵Zeros 全零矩阵 注:diag(A,n)以向量A为主对角线为基准偏移n个位置。 2.2 矩阵连接 水平c=[a,b]或者c=[a b] 垂直c=[a;b] 连接函数(1)Cat 指定方向;(2)Cat(1,a,b)水平;(3)Cat(2,a,b)垂直;(4)Horzcat 水平方向;(5)Vertcat 垂直方向(6)Repmat 对现有矩阵复制粘贴(7)Blkdiag 以对角阵方式重组。 2.3 改变矩阵形状 Reshape 制定行列重排;Rot90 逆时针90;Filplr 垂直方向为轴旋转180;Flipud 水平方向为轴旋转180;Flipdim 指定方向为轴翻转矩阵 2.4 向量生成函数 Linspace(a,b)首尾为a,b的100个数;Linspace(a,b,n) Logspace(a,b)以10为底;Logspace(a,b,n);Logspace(a,pi) 2.5 矩阵信息的获取 Isempty 判断为空;Isscalar 判断为标量;Isvector 判断向量;Issparse 判断稀疏矩阵;Isa 判断指定数据类型;Iscell 判断元胞数组类型;Iscellstr 元胞字符串数组类型;Isfloat 判断浮点数;Isinteger 判断整形类型;Islogical 判断逻辑类型Isnumeric 判断数值类型;Isreal 判断实数类型;Isstruct 判断结构体类型;Length 最长维长度;Ndims 维数;Numel 元素个数;Size 指定维长度 3 数据类型

Matlab常用工具箱及常用函数

Matlab常用工具箱 MATLAB包括拥有数百个内部函数的主包和三十几种工具包.工具包又可以分为功能性工具包和学科工具包.功能工具包用来扩充MATLAB的符号计算,可视化建模仿真,文字处理及实时控制等功能.学科工具包是专业性比较强的工具包,控制工具包,信号处理工具包,通信工具包等都属于此类. 开放性使MATLAB广受用户欢迎.除内部函数外,所有MATLAB主包文件和各种工具包都是可读可修改的文件,用户通过对源程序的修改或加入自己编写程序构造新的专用工具包. Matlab Main Toolbox——matlab主工具箱 Control System Toolbox——控制系统工具箱 Communication Toolbox——通讯工具箱 Financial Toolbox——财政金融工具箱 System Identification Toolbox——系统辨识工具箱 Fuzzy Logic Toolbox——模糊逻辑工具箱 Higher-Order Spectral Analysis Toolbox——高阶谱分析工具箱 Image Processing Toolbox——图象处理工具箱 LMI Control Toolbox——线性矩阵不等式工具箱 Model predictive Control Toolbox——模型预测控制工具箱 μ-Analysis and Synthesis Toolbox——μ分析工具箱 Neural Network Toolbox——神经网络工具箱 Optimization Toolbox——优化工具箱 Partial Differential Toolbox——偏微分方程工具箱 Robust Control Toolbox——鲁棒控制工具箱 Signal Processing Toolbox——信号处理工具箱 Spline Toolbox——样条工具箱 Statistics Toolbox——统计工具箱 Symbolic Math Toolbox——符号数学工具箱 Simulink Toolbox——动态仿真工具箱 Wavele Toolbox——小波工具箱 常用函数Matlab内部常数[3] eps:浮点相对精度 exp:自然对数的底数e i或j:基本虚数单位 inf或Inf:无限大, 例如1/0 nan或NaN:非数值(Not a number),例如0/0 pi:圆周率p(= 3.1415926...) realmax:系统所能表示的最大数值 realmin:系统所能表示的最小数值 nargin: 函数的输入引数个数 nargout: 函数的输出引数个数 lasterr:存放最新的错误信息 lastwarn:存放最新的警告信息 MATLAB常用基本数学函数 abs(x):纯量的绝对值或向量的长度 angle(z):复数z的相角(Phase angle)

matlab常用解方程及方程组函数

1.roots求解多项式的根 r=roots(c) 注意:c为一维向量,者返回指定多项式的所有根(包括复根),poly和roots是互为反运算,还有就是roots只能求解多项式的解 还有下面几个函数poly2sym、sym2poly、eig >>syms x >>y=x^5+3*x^3+3; >>c=sym2poly(y);%求解多项式系数 >>r=roots(c); >>poly(r) 2.residue求留数 [r, p, k] = residue(b,a) >>b = [ 5 3 -2 7] >>a = [-4 0 8 3] >>[r, p, k] = residue(b,a) 3.solve符号解方程(组)——使用最多的 g = solve(eq1,eq2,...,eqn,var1,var2,...,varn) 注意:eqn和varn可以是符号表达式,也可以是字符串表达式,但是使用符号表达式时不能有“=”号,假如说varn没有给出,使用findsym函数找出默认的求解变量。返回的g是一个结构体,以varn为字段。由于符号求解的局限性,好多情况下可能得到空矩阵,此时只能用数值解法 解方程A=solve('a*x^2 + b*x + c') 解方程组B=solve('a*u^2 + v^2', 'u - v = 1', 'a^2 - 5*a + 6') 4.fzero数值求零点 [x,fval,exitflag,output]=fzero(fun,x0,options,p1,p2...) fun是目标函数,可以是句柄(@)、inline函数或M文件名 x0是初值,可以是标量也可以是长度为2的向量,前者给定一个位置,后者是给定一个范围 options是优化参数,通过optimset设置,optimget获取,一般使用默认的就可以了,具体参照帮助 p1,p2...为需要传递的其它参数

MATLAB常用函数说明

MATLAB常用函数 2008-04-23 09:47 matlab常用函数- - 1、特殊变量与常数 ans 计算结果的变量名 computer 确定运行的计算机 eps 浮点相对精度 Inf 无穷大 I 虚数单位 inputname 输入参数名 NaN 非数 nargin 输入参数个数 nargout 输出参数的数目 pi 圆周率 nargoutchk 有效的输出参数数目 realmax 最大正浮点数 realmin 最小正浮点数 varargin 实际输入的参量 varargout 实际返回的参量 操作符与特殊字符 + 加- 减 * 矩阵乘法.* 数组乘(对应元素相乘) ^ 矩阵幂.^ 数组幂(各个元素求幂) \ 左除或反斜杠/ 右除或斜面杠 ./ 数组除(对应元素除) kron Kronecker张量积 : 冒号() 圆括 [] 方括. 小数点 .. 父目录... 继续 , 逗号(分割多条命令); 分号(禁止结果显示)% 注释! 感叹号 ' 转置或引用= 赋值 == 相等<> 不等于 & 逻辑与| 逻辑或 ~ 逻辑非xor 逻辑异或 2、基本数学函数 abs 绝对值和复数模长 acos,acodh 反余弦,反双曲余弦 acot,acoth 反余切,反双曲余切 acsc,acsch 反余割,反双曲余割 angle 相角 asec,asech 反正割,反双曲正割

secant 正切 asin,asinh 反正弦,反双曲正弦 atan,atanh 反正切,双曲正切 tangent 正切 atan2 四象限反正切 ceil 向着无穷大舍入 complex 建立一个复数 conj 复数配对 cos,cosh 余弦,双曲余弦 csc,csch 余切,双曲余切 cot,coth 余切,双曲余切 exp 指数 fix 朝0方向取整 floor 朝负无穷取整 *** 最大公因数 imag 复数值的虚部 lcm 最小公倍数 log 自然对数 log2 以2为底的对数 log10 常用对数 mod 有符号的求余 nchoosek 二项式系数和全部组合数 real 复数的实部 rem 相除后求余 round 取整为最近的整数 sec,sech 正割,双曲正割 sign 符号数 sin,sinh 正弦,双曲正弦 sqrt 平方根 tan,tanh 正切,双曲正切 3、基本矩阵和矩阵操作 blkding 从输入参量建立块对角矩阵 eye 单位矩阵 linespace 产生线性间隔的向量 logspace 产生对数间隔的向量 numel 元素个数 ones 产生全为1的数组 rand 均匀颁随机数和数组 randn 正态分布随机数和数组 zeros 建立一个全0矩阵colon) 等间隔向量cat 连接数组 diag 对角矩阵和矩阵对角线 fliplr 从左自右翻转矩阵

matlab常用函数39623

A a abs 绝对值、模、字符的ASCII码值acos 反余弦 acosh 反双曲余弦 acot 反余切 acoth 反双曲余切 acsc 反余割 acsch 反双曲余割 align 启动图形对象几何位置排列工具all 所有元素非零为真 angle 相角 ans 表达式计算结果的缺省变量名any 所有元素非全零为真 area 面域图 argnames 函数M文件宗量名 asec 反正割 asech 反双曲正割 asin 反正弦 asinh 反双曲正弦 assignin 向变量赋值 atan 反正切 atan2 四象限反正切 atanh 反双曲正切 autumn 红黄调秋色图阵 axes 创建轴对象的低层指令 axis 控制轴刻度和风格的高层指令 B b bar 二维直方图 bar3 三维直方图 bar3h 三维水平直方图 barh 二维水平直方图 base2dec X进制转换为十进制 bin2dec 二进制转换为十进制blanks 创建空格串 bone 蓝色调黑白色图阵 box 框状坐标轴 break while 或for 环中断指令brighten 亮度控制 C c

capture (3版以前)捕获当前图形 cart2pol 直角坐标变为极或柱坐标 cart2sph 直角坐标变为球坐标 cat 串接成高维数组 caxis 色标尺刻度 cd 指定当前目录 cdedit 启动用户菜单、控件回调函数设计工具cdf2rdf 复数特征值对角阵转为实数块对角阵ceil 向正无穷取整 cell 创建元胞数组 cell2struct 元胞数组转换为构架数组celldisp 显示元胞数组内容 cellplot 元胞数组内部结构图示 char 把数值、符号、内联类转换为字符对象chi2cdf 分布累计概率函数 chi2inv 分布逆累计概率函数 chi2pdf 分布概率密度函数 chi2rnd 分布随机数发生器 chol Cholesky分解 clabel 等位线标识 cla 清除当前轴 class 获知对象类别或创建对象 clc 清除指令窗 clear 清除内存变量和函数 clf 清除图对象 clock 时钟 colorcube 三浓淡多彩交叉色图矩阵 colordef 设置色彩缺省值 colormap 色图 colspace 列空间的基 close 关闭指定窗口 colperm 列排序置换向量 comet 彗星状轨迹图 comet3 三维彗星轨迹图 compass 射线图 compose 求复合函数 cond (逆)条件数 condeig 计算特征值、特征向量同时给出条件数condest 范-1条件数估计 conj 复数共轭 contour 等位线 contourf 填色等位线 contour3 三维等位线 contourslice 四维切片等位线图

Matlab笔记之五--MATLAB常用函数简介

MATLAB 常用函数简介

一、通用命令 1.1帮助命令 demo 启动演示程序 helpbrowser 超文本文档帮助信息 help 在线帮助命令 helpdesk 超文本文档帮助信息 doc 以超文本方式显示帮助文档Helpwin 打开在线帮助窗 1.2工作空间管理 clear 从内存中清除变量和函数 quit 退出MATLAB clc 清除命令窗口 exit 关闭MATLAB save 把变量存入数据文件中 who 列出工作空间中的变量 load 从文件中读入数据变量 whos 列出工作内存中变量的详细信息 format 设置数据显示格式 what 列出当前目录中的Matlab文件 more 分页输出 which 查找指定函数和文件的位置 1.3路径管理 addpath 添加搜索路径 path 控制MATLAB的搜索路径 rmpath 从搜索路径中删除目录 pathtool 弹出修改搜索路径窗口 1.4操作系统指令

改变当前工作目录 pwd 显示当前工作目录名 copyfile 文件拷贝 getenv 给出环境值 delete 删除文件 dos 执行DOS指令并返回结果 dir 列出文件 ! 执行外部应用程序 mkdir 创建目录 rmdir 删除目录 二、基本运算 2.1算术运算 + 加 / 斜杠或右除.* 数组乘 - 减 \ 反斜杠或左除 ./ 数组右除 * 矩阵乘 ^ 矩阵乘方 .\ 数组左除 dot 向量内积 cross 向量叉积 .^ 数组乘方 kron Kronecker乘积或张量积 2.2关系运算 <

> 大于 == 等于 <= 小于或等于 >= 大于或等于 ~= 不等于 2.3逻辑操作 & 逻辑“与” | 逻辑“或” ~ 逻辑“非” xor 逻辑“异或” any 有非零元素则为真all 所有元素非零时为真

Matlab主要函数使用方法

Matlab主要函数使用方法 ndims(A)用ndims命令常看矩阵的维数 1. matlab中mod的用法 简单的说mod(a,b)就是求的是a除以b的余数。比方说mod(100,3)=1,mod(17,6)=5 Examples mod(13,5) ans = 3 mod([1:5],3) ans = 1 2 0 1 2 mod(magic(3),3) ans = 2 1 0 0 2 1 1 0 2 2. 关于Matlab中size()的问题 size按照下面的形式使用: [m,n]=size(a,x)。一般的,函数的输入参量x不是用,这是当只有一个输出变量时,size返回一个行向量,第一个数为行数,第二个数为列数;如果有两个输出变量,第一个返回量为行数,第二个返回数为列数。当使用x时,x=1返回行数,x=2返回列数,这时只有一个返回值。 我要问的是: I=im2double(imread(file)) ;//把图像数组转换成double精度类型; if(size(I,3) > 1) I = rgb2gray( I ) ;

end 中size(I,3) 代表什么意思?按照上面的说法X=1,2都可以理解。 I 代表的是图像数组阿,不是二维的么?那么size(I,3) 中的3 代表什么? 一个函数可以是多维的..比如说是一个10*10*10*10的距阵 那就是说这个距阵是4维的.. 那个'()'里的3就是指的第三维 3.r = corr2(A,B) 计算两个矩阵的二维相关系数. 4.matlab中imshow显示问题 各位好,将一幅灰度图像经过小波变换后,数据变成double型,对变换后的图像进行显示时,设变换后的图像为y,为何用imshow(uint8(y))和imshow(y,[])时的图像显示结果不同呢?请问该如何正确显示变换后的图像呢?着急解决,请各位xdjm帮帮忙吧! 回答: imshow(uint8(y))是按照256级灰度显示y得绝对数据。0表示0,255表示255,大于255得都是255。imshow(y,[]),将y得最小值看作0,最大值看作255。 所以两者不同。 小波变换得图像应该用第二种显示,把数据scale一下。 5.matlab中用imshow显示图像由于数组类型产生的错误 今天在用MATLAB写程序的时候遇到个问题,以前一直没有注意到,刚才检查的时候才发现。 我们先来看段不复杂的程序 %定义常量 size=256; block=8; I_w=zeros(size); %读入原始图像和水印图像并显示 I=imread('lena.bmp'); W=imread('watermark.bmp');

MATLAB常用函数

数字信号处理与MA TLAB 实现 1. n1=[ns:nf]; x1=[zeros(1,n0-ns),1,zeros (1,nf-n0)]; %单位抽样序列的产生 2. subplot(2,2,4) 画2行2列的第4个图 3. stem(n,x) %输出离散序列,(plot 连续) 4. 编写子程序可调用 4.1 单位抽样序列)(0n n -δ生成函数impseq.m [x,m]=impseq(n0,ns,nf); %序列的起点为ns ,终点为nf ,在n=n0点处生成一个单位脉冲 n=[-5:5];x1=3*impseq(2,-5,5)-impseq(-4,-5,5) x1 = 0 -1 0 0 0 0 0 3 0 0 0 n=[-5:5];x1=3*impseq(2,-4,5)-impseq(-4,-5,4) %起点到终点长度要一致 x1 = 0 -1 0 0 0 0 3 0 0 0 4.2 单位阶跃序列)(0n n u -生成函数stepseq.m [x,n]=stepseq(no,ns,nf) %序列的起点为ns ,终点为nf ,在n=n0点处生成一个单位阶跃 4.3 两个信号相加的生成函数sigadd.m [y,n]=sigadd(x1,n1,x2,n2) 4.4 两个信号相乘的生成函数sigmult.m [y,n]=sigmult(x1,n1,x2,n2) 4.5 序列移位y(n)=x(n-n0)的生成函数sigshift.m [y,n]=sigshift(x,m,n0) 4.6 序列翻褶y(n)=x(-n)的生成函数sigfold.m [y,n]=sigfold(x,n) 4.7 evenodd.m 函数可以将任一给定的序列x(n)分解为xe(n)和xo(n)两部分 [xe,xo,m]=evenodd(x,n) 4.8 序列从负值开始的卷积conv_m, conv 默认从0开始 function [y ,ny]=conv_m(x,nx,h,nh) 有{x(n):nx1≤n ≤nx2},{h(n):nh1≤n ≤nh2}, 卷积结果序列为{y(n):nx1+nh1≤n ≤nx2+nh2} 例. 设1132)(-++=z z z X ,1225342)(-+++=z z z z X ,求)()()(21z X z X z Y += 程序: x1=[1,2,3];n1=-1:1; x2=[2,4,3,5];n2=-2:1; [y,n]=conv_m(x1,n1,x2,n2) 结果: y = 2 8 17 2 3 19 15 n = -3 -2 -1 0 1 2 因此21231519231782)(--+++++=z z z z z z Y

Matlab常用函数列表

附录 MATLAB图像处理工具箱函数 表1 通用函数 函数功能语法 colorbar 显示颜色条colorbar colorbar(...,'peer',axes_handle) colorbar(axes_handle) colorbar('location') colorbar(...,'PropertyName',propertyvalue) cbar_axes = colorbar(...) getimage 从坐标轴取得图像数据A = getimage(h) [x,y,A] = getimage(h) [...,A,flag] = getimage(h) [...] = getimage image 创建并显示图像对象image(C) image(x,y,C) image(...,'PropertyName',PropertyValue,...) image('PropertyName',PropertyValue,...) Formal syntax - PN/PV only handle = image(...) imagesc 按图像显示数据矩阵imagesc(C) imagesc(x,y,C) imagesc(...,clims) h = imagesc(...) imshow 显示图像imshow(I,n) imshow(I,[low high]) imshow(BW) imshow(X,map)

imshow(RGB) imshow(…,display_option) imshow(x,y,A,…) imshow filename h = imshow(…) imview 利用图像浏览器显示图像imview(I) imview(RGB) imview(X,map) imview(I,range) imview(filename) imview(...,'InitialMagnification',initial_mag) h = imview(...) imview close all montage 在矩形框中同时显示多帧图 像 montage(I) montage(BW) montage(X,map) montage(RGB) h = montage(...) immovie 创建多帧索引色图像的电影 动画 mov = immovie(X,map) mov = immovie(RGB) subimage 在一个图形中显示多个图 像,结合函数subplot使用 subimage(X,map) subimage(I) subimage(BW) subimage(RGB) subimage(x,y,...) h = subimage(...) truesize 调整图像显示尺寸truesize(fig,[mrows mcols]) truesize(fig) wrap 将图像显示到纹理映射表面warp(X,map) warp(I,n) warp(BW) warp(RGB) warp(z,...) warp(x,y,z,...) h = warp(...)

matlab常用函数表

MATLAB常用数学函数

附录1.1 管理用命令 函数名功能描述函数名功能描述 addpath 增加一条搜索路径rmpath 删除一条搜索路径 demo 运行Matlab演示程序type 列出.M文件 doc 装入超文本文档version 显示Matlab的版本号 help 启动联机帮助what 列出当前目录下的有关文件 lasterr 显示最后一条信息whatsnew 显示Matlab的新特性 lookfor 搜索关键词的帮助which 造出函数与文件所在的目录 path 设置或查询Matlab路径 附录1.2管理变量与工作空间用命令 函数名功能描述函数名功能描述 clear 删除内存中的变量与函数p ack 整理工作空间内存 disp 显示矩阵与文本save 将工作空间中的变量存盘 length 查询向量的维数size 查询矩阵的维数 load 从文件中装入数据who,whos 列出工作空间中的变量名 附录1.3文件与操作系统处理命令 函数名功能描述函数名功能描述 cd 改变当前工作目录edit 编辑.M文件 delete 删除文件matlabroot 获得Matlab的安装根目录 diary 将Matlab运行命令存盘t empdir 获得系统的缓存目录 dir 列出当前目录的内容tempname 获得一个缓存(temp)文件 ! 执行操作系统命令 附录1.4窗口控制命令 函数名功能描述函数名功能描述 echo 显示文件中的Matlab中的命令m ore 控制命令窗口的输出页面 format 设置输出格式 附录1.5启动与退出命令 函数名功能描述函数名功能描述 matlabrc 启动主程序quit 退出Matlab环境 startup Matlab自启动程序 附录2 运算符号与特殊字符附录 2.1运算符号与特殊字符 函数名功能描述函数名功能描述 + 加... 续行标志 - 减, 分行符(该行结果不显示) * 矩阵乘; 分行符(该行结果显示) .* 向量乘% 注释标志 ^ 矩阵乘方! 操作系统命令提示符 .^ 向量乘方矩阵转置 kron 矩阵kron积. 向量转置 \ 矩阵左除= 赋值运算 / 矩阵右除== 关系运算之相等 .\ 向量左除~= 关系运算之不等 ./ 向量右除< 关系运算之小于

相关主题
文本预览
相关文档 最新文档