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

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

 Réponse acceptée

Kojiro Saito
Kojiro Saito le 9 Déc 2021

1 vote

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

1 commentaire

Yasumaru Hirai
Yasumaru Hirai le 10 Déc 2021
ありがとうございました!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB 入門 dans Centre d'aide et File Exchange

Produits

Version

R2020b

Community Treasure Hunt

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

Start Hunting!