Which function used to use in M-Script to remove the variables

Variable name in M-Script 1Tn007 - numbers are allowed to start as variable name
Which function used to use in M-Script to remove the variables

답변 (2개)

a = 3;
b = 4;
% use clear to remove variables
clear a
whos
Name Size Bytes Class Attributes ans 1x1 8 double b 1x1 8 double cmdout 1x33 66 char gdsCacheDir 1x14 28 char gdsCacheFlag 1x1 8 double i 0x0 0 double managers 1x0 0 cell managersMap 0x1 8 containers.Map
a
Unrecognized function or variable 'a'.
Walter Roberson
Walter Roberson 2024년 3월 14일

0 개 추천

It is not possible to create a variable with a name similar to 1Tn007
What can happen is that if you load() a .mat that was generated by a third-party tool, and the .mat had a variable that is a struct, then the struct can end up with invalid field names. If the invalid names were the names of variables, then MATLAB will refuse to load that variable.

카테고리

도움말 센터 및 File Exchange에서 Workspace Variables and MAT Files에 대해 자세히 알아보기

질문:

2024년 3월 14일

답변:

2024년 3월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by