fr = fopen('inputFile.txt','r');

for i=1:numOfpoint

train_matrix= fscanf(fr,'%f',2);

y(i) = fscanf(fr,'%f',1);

end

fclose(fr);

 

fopen : open the file

fscanf : read the file ,  fscanf(fr,'%f',2); represent that the computer should read 2 number from the file.


arrow
arrow
    全站熱搜

    JerryCheng 發表在 痞客邦 留言(0) 人氣()