function does not store variable at workspace

조회 수: 1 (최근 30일)
Cem Eren Aslan
Cem Eren Aslan 2021년 12월 27일
댓글: Walter Roberson 2021년 12월 27일
Hello everyone,
I write a function and it works properly, it gives results at command window. However it does not store anayting at workspace. My funcion as follows:
function qwerty
a1=[];
x1=[];
x2=[];
x3={};
x4=[];
x5=[];
x6=[];
func1;
func2;
func3;
func4;
function func1
a1 = readtable('asd.xlx');
x1=a1;
end
function func2
statement
x2=statement;
end
function func3
statementp;
x3=statement;
end
function func4
statement;
x4=statement;
x5=statement;
x6=statement;
end
end
  댓글 수: 4
Chunru
Chunru 2021년 12월 27일
Try not use global. If you do want to keep them in workspace, use script. Or you post your complete program so that we can help you.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Performance and Memory에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by