Global Variable

3 次查看(过去 30 天)
Debabrata Chowdhuri
I want know the procedure to pass a value of a variable from one function to another.
  1 个评论
Jiro Doke
Jiro Doke 2012-2-18
Why don't you pass it as an input argument of the function?

请先登录,再进行评论。

回答(1 个)

Prashant Somani
Prashant Somani 2012-2-18
define it with global
Example:
function fn1()
global var1;
function fn2()
global var1

类别

Help CenterFile Exchange 中查找有关 Entering Commands 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by