How many workspaces are present in matlab??

Hi I would like to know How many workspaces are present in matlab??. I know about the base workspace which is the one that is present in matlab desktop screen. But is there any other workspaces available?. if so please let me know what are those and how to access them.

回答 (1 件)

Simon
Simon 2013 年 11 月 21 日

1 投票

Hi!
Each function has its own workspace. If you write a function you will have a separate workspace to work in, without the variables from the base workspace.

3 件のコメント

Abhishek M
Abhishek M 2013 年 11 月 21 日
Hi Simon, Thanks for ur answer. Can you please explain this with an example or could you please provide me the link or reference for your answer.
Simon
Simon 2013 年 11 月 21 日
I think you should start reading here: Function Basics
Marc
Marc 2013 年 11 月 21 日
a = 1; b = 2; c = a+b
c1 = simpFunc(b);
In its own file
function c = simpFunc(b)
a = 2; c = a+b; end
See if 'a' changes outside of the function or if c and c1 are equal.

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

カテゴリ

タグ

質問済み:

2013 年 11 月 21 日

コメント済み:

2013 年 11 月 21 日

Community Treasure Hunt

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

Start Hunting!

Translated by