フィルターのクリア

How many Workspace's we have in MATLAB ?

8 ビュー (過去 30 日間)
Sasidhar Duggireddy
Sasidhar Duggireddy 2021 年 2 月 17 日
コメント済み: Walter Roberson 2021 年 2 月 17 日
I asked some of the people that how many workspaces we have in MATLAB and what are they?,But I haven't found exact answor.
example:
1. Base workspace
2. Model workspace
Please let me know if you are aware about this. May be this answor will help to some people.

回答 (3 件)

Jonas
Jonas 2021 年 2 月 17 日
編集済み: Jonas 2021 年 2 月 17 日
There are three locations to store model data:
  • Base workspace
  • Model workspace
  • Data dictionary
Find more info here on the comparison between these three, and when each storage location is used.
  • There is only one base workspace per MATLAB client. (when using the Parallel Computing Toolbox, each worker has its own base workspace)
  • Each Simulink model has its own model workspace.
  • You can have many Data dictionaries which can reference eachother

Cris LaPierre
Cris LaPierre 2021 年 2 月 17 日
編集済み: Cris LaPierre 2021 年 2 月 17 日
In MATLAB, you have your base workspace and then a workspace for each function called.
When debugging a script or function, you can inspect the available workspaces in the Function Call Stack (see here).
  1 件のコメント
Walter Roberson
Walter Roberson 2021 年 2 月 17 日
The global workspace is another one.
So one base workspace, one global workspace, one workspace per executing function.
As well, each function can have persistent variables which could potentially be considered a workspace associated with with the JIT compiled version of the function.
Anonymous functions that refer to variables other than the parameters, have a workspace to hold static copies of the value of the variable as of the time the function handle was built.

サインインしてコメントする。


Fangjun Jiang
Fangjun Jiang 2021 年 2 月 17 日
Another common one is the function workspace, which is created when the function is entered and destroyed when the function is exited. see the Help document of evalin() and assignin().

カテゴリ

Help Center および File ExchangeSimulink Functions についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by