MATLAB: How to declare global variable

global variable

I have multiple m-files and i want to use same global variable for all files so how should i declare and on which place

Best Answer

function y=fcn1(~)
global your_variable
do it in all your functions
Related Question