Effacer les filtres
Effacer les filtres

Finding value for each degree from matlab figure

2 vues (au cours des 30 derniers jours)
helin özdemir
helin özdemir le 4 Mai 2024
Modifié(e) : Voss le 5 Mai 2024
After running the values I obtained from a NACA profile in Matlab along with the txt file, I perform the smoothing process. I am trying to find equivalents at every level for the figure in the appendix. How can I do it
This is the command I run for the figure I obtained:
[Alfa2D, cl2D, ~, ~]= textread('Naca LD1408 9R.txt','%f %f %f %f');
N2D = size(Alfa2D,1);
%--------------------------------------------------------------------------
% Fit a Smoothing Spline Model
%--------------------------------------------------------------------------
f = fit(Alfa2D, cl2D,'smoothingspline','SmoothingParam',0.3)
f =
Smoothing spline: f(x) = piecewise polynomial computed from p Coefficients: p = coefficient structure
figure(1); plot(f,Alfa2D,cl2D)
  2 commentaires
Walter Roberson
Walter Roberson le 5 Mai 2024
I am trying to find equivalents at every level for the figure in the appendix.
Could you explain that more?
helin özdemir
helin özdemir le 5 Mai 2024
Hello, the Naca LD1408 9R.txt file that I used to obtain the figure is at the top of the post. The data I want to obtain is the red (fitted curve) line in the figure file. I want to obtain the values of the fitted curve line at 1 degree or 0.5 degree intervals. For example, it starts from -15 x= -15 y=0.75 x=-14 y= 0.80. Is there a command that will do this automatically and correctly?

Connectez-vous pour commenter.

Réponse acceptée

Voss
Voss le 5 Mai 2024
Modifié(e) : Voss le 5 Mai 2024
data = readmatrix('Naca LD1408 9R.txt');
f = fit(data(:,1), data(:,2),'smoothingspline','SmoothingParam',0.3);
xi = -15:1:18; % or -15:0.5:18 or whatever
yi = f(xi);
figure
plot(f,data(:,1),data(:,2))
hold on
plot(xi,yi,'o','MarkerFaceColor','g','DisplayName','1° intervals')
set(get(gca(),'Legend'),'Location','best');

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Produits


Version

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by