MATLAB: Creating Line graphs and Surface Plot

graphlinesurfacex axis

Hi Everyone
I will be very grateful if anyone can help me create a line graph and also a surface plot using the attached tables. I will like the x-axis to be Abilities and y-axis to be total score and then make the graphs grouping by (Naive C or Naive D).

Best Answer

[num,txt,raw] = xlsread('Graph Data.csv') ;
x = num(:,1) ;
y = num(:,2) ;
figure
plot(x,y,'.r')
xi = unique(x) ;
X = reshape(x,length(x)/length(xi),[]) ;
Y = reshape(y,length(x)/length(xi),[]) ;
figure
surf(X,Y,Y)
Related Question