You could try
status=system('function.exe track.dat grid.dat info.dat')
The syntax you used with '<' is only for the case of "standard input", what the user would type if the program were run without using the '<' . There can only be one standard input file. The syntax I used is for the case where the program reads its command arguments and knows what to do with the names listed.
There is another possible interpretation for what you want to do. It could be that the program reads asking for file names to process, and you want to provide the string 'track.dat' in response, whereas your current code would provide the content of track.dat . If you are trying to provide the three file names as strings as if the user had typed them in when prompted, then use
tname = tempname();
fid = fopen(tname, 'wt');
fprintf(fid, 'track.dat\ngrid.dat\ninfo.dat\n');
fclose(fid);
status = system( sprintf('function.exe < "%s"', tname) );
delete(tname);
What this is doing is creating a temporary file to hold those strings, and then sending the content of the file as input to the program, and afterwards deleting the file.
Best Answer