Reputation: 43
I am trying to run the code
function [ outStruct ] = loadfile( filename )
fid = fopen(filename,'r');
vector=[];
i=1;
while ~feof(fid)
line=fget1(fid);
vector(i)=AnotherFunction(line);
i=i+1;
end
end
But I keep getting the error message 'Undefined function 'fget1' for input arguments of type 'double''.
This whole function is mostly a copy of something we did in class, where it seemed to run fine, so I don't know the problem here.
Upvotes: 0
Views: 532
Reputation: 4768
I think you mean fgetl
, not fget1
. Note that the last letter in the first one is an L, while in the second (your version) you've put a one.
Upvotes: 2