How do i clear all except one variable?

I want to clear all variables except one
entering all variable to be cleared is a lengthy process, has many variables and function

 採用された回答

Walter Roberson
Walter Roberson 2018 年 12 月 18 日

40 投票

clearvars -except NAME

2 件のコメント

Pedapudi Bharath Raja Bhoopal
Pedapudi Bharath Raja Bhoopal 2020 年 12 月 14 日
Thankyou it worked
clearvars -except X %deletes all variables except X in workspace
Matthew Creek
Matthew Creek 2023 年 8 月 24 日

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および 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