Write MATLAB codes to recover the arrays x and y from the text file
here is the text file contents:
The following tabulates the pairs (x,y)
where y=x^2-x+2
1 2
2 4
3 8
4 14
5 22
6 32
7 44
8 58
9 74
10 92
and here are my codes to recover the arrays x and y:
fid=fopen('C:\Users\yash\Documents\MAT…
C=textscan(fid,'%d',1,'Headerlines',2)…
N=C{1};
D=textscan(fid,'%2d %4d',N);
fclose(fid);
it does not work when i enter D{1} and D{2} on the command window please help?