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

34 visualizaciones (últimos 30 días)
Yasumaru Hirai
Yasumaru Hirai el 9 de Dic. de 2021
Comentada: Yasumaru Hirai el 10 de Dic. de 2021
addpath(C:example)  %このようなプログラムの入力を行いたいが
addpath(C:¥example)  %このような変換が行われ、¥の部分に演算子の使用が無効ですとの表示が出る。

Respuesta aceptada

Kojiro Saito
Kojiro Saito el 9 de Dic. de 2021
addpathのドキュメントを読むと、括弧の中身は文字ベクトル または string スカラーとなっています。
半角のシングルクォーテーション(')かダブルクオーテーション(")で括って、以下のように実行してみるとできると思います。
addpath('C:¥example')
  1 comentario
Yasumaru Hirai
Yasumaru Hirai el 10 de Dic. de 2021
ありがとうございました!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre データ型の変換 en Help Center y File Exchange.

Productos


Versión

R2020b

Community Treasure Hunt

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

Start Hunting!