Artifact 37968e6d57ebe6f22ebf4166dead69b3097e6bc1aa3f5cb91eac8121db0db412:
- File
mttroot/ntt/bin/trans/mttReadFile.m
— part of check-in
[745f0b3e31]
at
2003-10-20 17:10:30
on branch origin/master
— Added initial revision of ntt:
new transformation tools for using bond graphs with Matlab.
Copyright 2003 Dr. Dominic J. Diston. (user: geraint@users.sourceforge.net, size: 523) [annotate] [blame] [check-ins using] [more...] - File ntt/bin/trans/mttReadFile.m — part of check-in [af3953deae] at 2021-03-01 11:39:42 on branch master — Cleanup repository after cvs2git conversion. (user: jeff@gridfinity.com, size: 523) [annotate] [blame] [check-ins using]
function content = mttReadFile(filename) file_exists = exist(filename)==2 ; if file_exists fid = fopen(filename,'r') ; reading = 1 ; counter = 0 ; while reading line = fgetl(fid) ; if ~isempty(line) if line==-1 reading = 0 ; else counter = counter + 1 ; content{counter} = line ; end end end fclose(fid) ; else error(['file_not_found[',filename,']']) end