洛伦(Matlab)的艺术

Turn ideas into MATLAB

笔记

洛伦(Matlab)的艺术已退休,不会更新。

Clearing the Air in Your MATLAB Session

随着时间的流逝,我已经改变了何时,何处以及如何“清理” MATLAB会话。您可能还需要更新您的策略。

内容

我以前做的

在最近的过去,如果我想在不重新启动MATLAB的情况下“从头开始”,我将清除工作区,命令窗口和关闭的打开数字。我会发出以下命令

CLC清除所有的所有力量

我现在应该做什么

I still do something very similar, but with an important though small-looking change. I remove theallfrom myclear陈述。这是我现在要做的。

clc clear close all force

我不再要求清除一切。为什么不?因为它是过度的,我可能会清理我希望保留的东西。例如?,您可能会说。看这个表,,,,also copied here, to see the items.

You'll notice that the oldclear all清除了我的工作空间中的变量。特别是,它清除了我已经运行的功能和MEX功能。没有充分的理由清除这些。实际上,您第一次运行功能时,您需要在您的位置上的位置上的磁盘上找到该功能(假设MATLAB或MEX代码),因为MATLAB需要在您的位置上找到该功能(假设MATLAB或MEX代码)MATLAB小路,,,,read it in, and prepare it so it can run (e.g., parse). Once MATLAB processes the file once, it does not need to do so again as long as the code remains in your session.

如何运行代码?

事实上,而不是打字三行,甚至创造ing a code file, I use a MATLAB shortcut on my Quick Access toolbar. Here's what my entry looks like.

You'll notice that I use "ccc" as the tooltip for when my mouse hovers over the label. And the label itself is "X".

你做什么工作?

当您想重置MATLAB会话时,您会做什么?重来?重置随机数生成器?我很想知道你的想法here




与Matlab®R2016A一起出版

|
  • 打印
  • 发送电子邮件