next up previous
Next: Calc_Print_sin Up: Sample Programs Previous: Do-Loop

Display

%
% This program opens a file that contains data,
% reads in a set of coordinates,
% and uses the matlab plot feature to show a graph
% of the curve that the data represents.
%
coordinates = fopen('data','r')
[A,i]=fscanf(coordinates,'%f%f',[2,inf])
X=A(1,:)
Y=A(2,:)
plot(X,Y)



Russ Miller
Thu Sep 14 13:56:19 EDT 1995