MATLAB は大文字と小文字を区別しますか?
9 views (last 30 days)
Show older comments
MathWorks Support Team
on 15 Dec 2022
Answered: MathWorks Support Team
on 15 Dec 2022
MATLAB は、コマンド実行において、完全に大文字と小文字を区別するか、教えてください。
Accepted Answer
MathWorks Support Team
on 15 Dec 2022
一般的に、MATLAB は大文字と小文字を区別します。
MATLAB では、すべてのプラットフォームにて、関数名や、スクリプト名、および変数名に関しては、大文字と小文字が区別されますが、名前と値(Nave-value) のペアなど、区別されない場合もあります。
>> plot(1:10,'linewidth',3)
>> plot(1:10,'LineWidth',3)
>> h = plot(1:10,'LINEWIDTH',3);
>> set(h, 'LineWidth',3)
>> set(h, 'linewidth',3)
実行できない例:
>> Plot(1:10) % エラー
>> h = plot(1:10);
>> h.linewidth = 3; % エラー (正しくは h.LineWidth = 3; )
なお、コマンドウィンドウやエディタ上でコード記述時にプロパティ名の途中まで入力し、Tab キーを押下すると、候補となる正しいプロパティ名が表示されます。これらの機能を活用し、正しいプロパティ名で記述されることをお勧めします。
0 Comments
More Answers (0)
See Also
Categories
Find more on グラフィックス オブジェクト in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!