I am currently trying to figure out a way to create a curve that would fit my data, not using the "plot" function. I have seen that there are filters that exist and tried the "sgolay" one but it won't work (probably because I don't quite understand how it works). I would appreciate some help.
Here is the current code:
set(0,'defaulttextinterpreter','latex') clf %plot(alpha1,F_z1,'*') hold on barplotxy(alpha1,F_z1,lalpha1,delta_fz1); barplotxy(alpha2,F_z2,lalpha2,delta_fz2); barplotxy(alpha3,F_z3,lalpha3,delta_fz3); barplotxy(alpha4,F_z4,lalpha4,delta_fz4); h=sgolayfilt(alpha4, 4, 7) title('Variation de la portance $F_z$ en fonction de l''angle d''incidence $\alpha$') ylabel('Force $F_z$ de portance [N]'); xlabel('Angle d''incidence $\alpha$ de l''\''ecoulement [rad]'); axis([-0.5 1 0 1.62])
and the previous version of the graph:
The smooth curve would fit the blue data (instead of a linear fit).
PS: I am French and I struggle with very specific terms (and Matlab in general) so it would d be really nice if you used the simplest terms possible.
thats nice so far. You did it with the curve fitting toolbox i guess (?)
Try the xlim command after the plot command for your fitted curve:
The interval of -0.5...1 is just taken from your diagramm - you can of course use the variables of your .mat files data for adjusting this.
I hope it works well for you. If you still have problems please share your code.