Variables not displayed in WorkSpace.

1 回表示 (過去 30 日間)
Tallha Akram
Tallha Akram 2012 年 1 月 16 日
編集済み: John Kelly 2015 年 2 月 26 日
From the main program, i have to call 3 different functions(e.g add, subtract and divide) and In each m-file i am using many new variables which are not shown in Matlab Workspace. Only called variables and variables in the main files are shown. Is there any setting to view all the variables in all m-files , i use in my Program.
main()
{
call fcn1(a,b)
call fcn2(c,d);
... }
fcn1()
{
(a, b, f,g, h, i, j ) all these variables are used which must be needed in WorkSpace.
Thanks in Advance.

回答 (1 件)

TAB
TAB 2012 年 1 月 16 日
編集済み: John Kelly 2015 年 2 月 26 日
In matlab every function has its own workspace which are diffrent from base workspace. Scope of the variables which are defined in function, is limited to that function only. Variables defined in function variables vanishes once function is exited.

カテゴリ

Help Center および File ExchangeWorkspace Variables and MAT-Files についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by