简体   繁体   English

如何获取Matlab或Octave中所有已定义变量的列表?

[英]How can I get a list of all the defined variables in Matlab or Octave?

I'm used to working in Matlab using its full GUI environment. 我习惯使用Matlab的完整GUI环境在Matlab中工作。 Due to license issues I went and installed Octave, but it appears that it doesn't have a GUI, at least not one that's installed by default. 由于许可证问题,我去安装了Octave,但它似乎没有GUI,至少没有默认安装的GUI。

I transferred the variables from Matlab to Octave by save ing them in Matlab and load ing them in Octave. 我将变量从Matlab转移到Octave,方法是savesave在Matlab中,然后将其load到Octave中。 Thing is, I don't remember the names because I got used to seeing them in the little workspace window which I no longer have. 事情是,我不记得这些名字了,因为我已经习惯于在我不再拥有的小工作区窗口中看到它们。

How can I see the list of defined variables and their types in Octave? 如何在Octave中查看已定义变量及其类型的列表?

命令whos做到这一点。

With the command whos you can even see the variables that the file has WITHOUT opening the file, to be assure that this file is the one. 使用whos命令,您甚至可以在不打开文件的情况下查看文件具有的变量,以确保该文件是一个文件。

For example, the name of the file is MyVariables.mat 例如,文件的名称是MyVariables.mat

use: 使用:

whos('-file','MyVariables.mat')

您可以使用类似于Matlab的GUI,例如QtOctave或GUIOctave。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM