Reputation: 4789
Hello I'm a octave beginner. I have a data set in a file as bellow:
12 20 3 1 \n
12 3 4 5
.......
These are the four co-ordinates of a rectangle. I need to plot all of these rectangles in a graph. I tried to read the file with following piece of code but I'm getting stuck.
fid=fopen("priminfo.txt");
A = testscan (fid, '%f %f %f %f %*[^\n]')
Any comments on that will be really helpful
Upvotes: 0
Views: 39
Reputation: 14937
This should work fine:
A = textscan(fid, '%f %f %f %f');
Actually, so should this
A = load('priminfo.txt');
Upvotes: 1