haibaraxx的个人博客分享 http://blog.sciencenet.cn/u/haibaraxx

博文

Matlab: list variables in the workspace

已有 1907 次阅读 2016-3-8 05:16 |个人分类:Matlab|系统分类:科研笔记| and, list, variables, sizes, types

% Note that the armguments should be a string with single quotes.

%% whos - list variables in alphabetical order with sizes and types

whos     % list all variables in the current workspace.
      whos('t1')     % list the variable t1 in the current workspace.
      whos('t2','t3')     % list the variable t2 and t3 in the current workspace.
      whos('t*')     % list all the variables in the current workspace that start with t.

% list all the varibales contained in a file (path) and store the info in structure array S.
      S = whos('-file','/Users/Yangyang/Documents/MATLAB/raw_acs_data17.mat');


%% who - list variables in alphabetical order without sizes and types

who     % list all variables in the current workspace.
      who('t1')     % list the variable t1 in the current workspace.
      who('t2','t3')     % list the variable t2 and t3 in the current workspace.
      who('t*')     % list all the variables in the current workspace that start with t.

% list all the varibales contained in a file (path) and store the info in structure array W.
      W = who('-file','/Users/Yangyang/Documents/MATLAB/raw_acs_data17.mat');



https://blog.sciencenet.cn/blog-3031432-961148.html

上一篇:Matlab: indexing
下一篇:Matlab: create uniformly distributed random numbers
收藏 IP: 134.1.1.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...
扫一扫,分享此博文

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-7-17 17:49

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部