How to clear file name and file path information?

4 Ansichten (letzte 30 Tage)
Leon
Leon am 20 Okt. 2019
Kommentiert: Leon am 20 Okt. 2019
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!

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 20 Okt. 2019
Use '' or "" as the value instead of []

Weitere Antworten (0)

Kategorien

Mehr zu Workspace Variables and MAT-Files finden Sie in Help Center und File Exchange

Produkte


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by