Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
numelems - インデックス可能な要素の数
使い方
numelems(expr)
パラメータ
expr
-
式
説明
numelems(expr) コマンドは、expr 内の要素数を返します。
このコマンドは、indexable 型の表現全てに使用できます。
expr が配列、行列、ベクトルのいずれかの場合、その配列等の範囲の要素数を返します。2x3 行列では、割り当てられていない要素があっても numelems による要素数は 6 となります。行列が疎であったり別の特別ストレージがあっても、密な長方形行列と同じ結果を返します。
expr が string の場合、expr 内の文字数を返します。
expr が table の場合、割り当てられた要素の数を返します。
expr が list または set の場合、第一レベルのインデックス可能要素数を返します。すなわち、5 要素のサブリストを 2 つ含むリストは、numelems により要素 2 つと報告されます。 これは、nops が報告する結果と同じです。
互換性
numelems コマンドは Maple 15 より導入されています。
Maple 15 の変更点についての詳細は、Maple 15 の更新情報 をご覧ください。
例
numelems(<1,2;3,4>);
numelems([1,2,3,4]);
numelems([[1,2],[3,4]]);
numelems(table({1=1,2=2,3=3}));
numelems("abc");
参照
nops, ArrayTools[NumElems], rtable_num_elems, entries, indices, length, upperbound, lowerbound
Download Help Document