필터 지우기
필터 지우기

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

조회 수: 1 (최근 30일)
Rightia Rollmann
Rightia Rollmann 2016년 8월 14일
편집: Stephen23 2016년 8월 14일
How to see a variable of a function in the Workspace?
  댓글 수: 4
Azzi Abdelmalek
Azzi Abdelmalek 2016년 8월 14일
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

댓글을 달려면 로그인하십시오.

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2016년 8월 14일
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)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Variables에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by