I can load a matrix from text file:
load mydata.txt
The problem is my matrix file is about 250Mb and after several such loads I have no mem
Use clear, or clearvars. By default, MATLAB will create a variable called mydata as a result of your statement, so
clear mydata