You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 2 Current »
Lag en funksjon som tar inn et filnavn, åpner filen og skriver innholdet ut i Command Window.
function readAndPrintFile( filename) fid = fopen(filename, 'r'); while( ~ feof( fid)) line = fgetl(fid); fprintf('%s', line); end fclose(fid); end