How do i clear all except one variable?

조회 수: 605 (최근 30일)
Kritank Kalyan
Kritank Kalyan 2018년 12월 18일
댓글: Matthew Creek 2023년 8월 24일
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일
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개)

카테고리

Help CenterFile Exchange에서 Workspace 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