help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

R: textscan


From: Riccardo Corradini
Subject: R: textscan
Date: Mon, 10 May 2010 13:38:22 +0000 (GMT)

Hi,
I use this function thanks to David Bateman to read ASCII .mat files from ox programming
language ..In the first line of the text file there are the number of rows and columns the others are the element of the matrix
function [m] = matread(filename)
 fid = fopen(filename,"rt"); [v, c] = fscanf(fid, "%g", Inf);
fclose(fid);
m = reshape (v(3:end), v(2), v(1))';
endfunction

Hope it might be a good template.
Bests regards
Riccardo Corradini

--- Lun 10/5/10, Sascha Raddatz <address@hidden> ha scritto:

Da: Sascha Raddatz <address@hidden>
Oggetto: textscan
A: address@hidden
Data: Lunedì 10 maggio 2010, 14:29

hi,
i want to translate the line

C = textscan(fid,'%*f %f','HeaderLines',7);

from matlab-code into octave. the function textscan reads two columns of float numbers from a textfile and puts it into a matrix C. It ignores the first seven header lines of the file.
is there anything similar for octave?

yours,
sascha

_______________________________________________
Help-octave mailing list
address@hidden
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave


reply via email to

[Prev in Thread] Current Thread [Next in Thread]