How to pass many variables to a function

1 Ansicht (letzte 30 Tage)
Jonathan Pulman
Jonathan Pulman am 26 Okt. 2013
Kommentiert: Jonathan Pulman am 26 Okt. 2013
I only know old Quick Basic! In that you could allow subprograms to access variables by using "DIM SHARED".
This made it easy to write code because you did not have to type in every variable each time it was passed to a subprogram.
It was easy to use a subprogram to keep the code compact and tidy.
Is there a way to do this when using a function in Matlab?
Is there a way of letting all variables access all functions?
Jonathan.

Antworten (1)

Youssef  Khmou
Youssef Khmou am 26 Okt. 2013
you can use the command :
global variabes

Kategorien

Mehr zu Debugging and Analysis 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