fid = fopen('P_1_2.s2p', 'rt'); if fid == -1 error(message('importTouchstone:filenotfound', filename)) end % find the option line idx = 1; temp_n=[]; while ~feof(fid) tline = textscan(fid, '%s', 1, 'delimiter', '\n') end fclose(fid);