Filter löschen
Filter löschen

how to see a variable of a function in the Workspace?

1 Ansicht (letzte 30 Tage)
Rightia Rollmann
Rightia Rollmann am 14 Aug. 2016
Bearbeitet: Stephen23 am 14 Aug. 2016
How to see a variable of a function in the Workspace?
  4 Kommentare
Azzi Abdelmalek
Azzi Abdelmalek am 14 Aug. 2016
function out_1 = test( in_1 )
global internal
out_1 = in_1 + 1;
internal = [ 1 2 ];
Save this function as test.m then in Matlab Windows command type
global internal
in_1=10 % set a value to in_1
out_1 = test( in_1 )
internal

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Azzi Abdelmalek
Azzi Abdelmalek am 14 Aug. 2016
function y=som(x,y,z)
global a b
a=x*y
b=y^z
y=a+b
When you call the function som
global a b
y=som(1,2,3)

Weitere Antworten (0)

Kategorien

Mehr zu Variables finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by