バックスラッシュを入力したいが¥に変換される。

addpath(C:example)  %このようなプログラムの入力を行いたいが
addpath(C:¥example)  %このような変換が行われ、¥の部分に演算子の使用が無効ですとの表示が出る。

 Akzeptierte Antwort

Kojiro Saito
Kojiro Saito am 9 Dez. 2021

1 Stimme

addpathのドキュメントを読むと、括弧の中身は文字ベクトル または string スカラーとなっています。
半角のシングルクォーテーション(')かダブルクオーテーション(")で括って、以下のように実行してみるとできると思います。
addpath('C:¥example')

1 Kommentar

Yasumaru Hirai
Yasumaru Hirai am 10 Dez. 2021
ありがとうございました!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB 入門 finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!