MATLAB は大文字と小文字を区別しますか?
13 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
MathWorks Support Team
il 15 Dic 2022
Risposto: MathWorks Support Team
il 15 Dic 2022
MATLAB は、コマンド実行において、完全に大文字と小文字を区別するか、教えてください。
Risposta accettata
MathWorks Support Team
il 15 Dic 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 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su グラフィックス オブジェクト in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!