Clear Filters
Clear Filters

Global Variable

4 views (last 30 days)
Debabrata Chowdhuri
Debabrata Chowdhuri on 18 Feb 2012
I want know the procedure to pass a value of a variable from one function to another.
  1 Comment
Jiro Doke
Jiro Doke on 18 Feb 2012
Why don't you pass it as an input argument of the function?

Sign in to comment.

Answers (1)

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

Categories

Find more on Entering Commands in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!