Deleting a certain base variable, from a function

6 ビュー (過去 30 日間)
Chris
Chris 2014 年 4 月 23 日
回答済み: Walter Roberson 2014 年 4 月 23 日
I'm writing a program with user inputs, split into sub functions, I want to be able to redo a certain part of the program, without running the whole program again.
At the start of the sub function I'd like to delete the previous set variable, which is a matrix array. But clear x, clearvars x doesn't work for me :(
Any ideas?
Thanks in advance!

回答 (1 件)

Walter Roberson
Walter Roberson 2014 年 4 月 23 日
evalin('base', 'clear x');

カテゴリ

Help Center および File ExchangeWorkspace Variables and MAT Files についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by