How to clear file name and file path information?

조회 수: 4 (최근 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 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