How to clear file name and file path information?

3 ビュー (過去 30 日間)
Leon
Leon 2019 年 10 月 20 日
コメント済み: Leon 2019 年 10 月 20 日
Most variables can be cleared by
var = [];
When I treid to do the same thing for my file name and path like below:
app.File.Value = [];
app.Path.Value = [],
I get this error:
Error using matlab.ui.control.EditField/set.Value
'Value' must be a character vector or a string scalar.
What is a better way of clearing these two variables? Thanks!

採用された回答

Walter Roberson
Walter Roberson 2019 年 10 月 20 日
Use '' or "" as the value instead of []
  1 件のコメント
Leon
Leon 2019 年 10 月 20 日
I didn't know it is as simple as that. Many thanks!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by