How to clear file name and file path information?

2 次查看(过去 30 天)
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 []

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Workspace Variables and MAT-Files 的更多信息

产品


版本

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by