Is it possible to import matrix and variables of a m-file function into workspace directly? please help also: i want to put a function in for-loop and there is a variable that is named: lable (string). lable, is the name of a matrix that in each loop, creates. for example when i=1 (first loop), lable='matrix1' .and when i=2,lable='matrix2' ,….
in function, a matrix creates with name of RESULT but i seriously need this name depends on 'lable', like: RESULT_lable . here i have 3 problems:
1- how could a string like lable add the name of RESULT matrix for being RESULT_lable to be a matrix in this name
2-now how could import RESULT_lable matrix directly into workspace( because where that I call this function, it self is a function too)
3-now after solving 1,2 it's needed writing if-end command, does this command true:
if exist('RESULT_lable')==0 %RESULT_lable must save in workspace
calling functionend
Best Answer