How to clear file name and file path information?

4 visualizaciones (últimos 30 días)
Leon
Leon el 20 de Oct. de 2019
Comentada: Leon el 20 de Oct. de 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!

Respuesta aceptada

Walter Roberson
Walter Roberson el 20 de Oct. de 2019
Use '' or "" as the value instead of []
  1 comentario
Leon
Leon el 20 de Oct. de 2019
I didn't know it is as simple as that. Many thanks!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Workspace Variables and MAT-Files en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by