필터 지우기
필터 지우기

How to pass many variables to a function

조회 수: 3 (최근 30일)
Jonathan Pulman
Jonathan Pulman 2013년 10월 26일
댓글: Jonathan Pulman 2013년 10월 26일
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.

답변 (1개)

Youssef  Khmou
Youssef Khmou 2013년 10월 26일
you can use the command :
global variabes

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by