I cant evaluate an expression after integrating using the symbolic toolbox

I need to calculate the area and mean aerodynamic chord of a modified eliptical wing.
The folowing equations describe the leading edge y_le = ((ls/k).^2 – (x*(ls/k)/(b/2)).^2).^(1/2) and trailing edge l_te = (((k-k1)*(ls/k)).^2 – ((k-k1)*x*(ls/k)/(b/2).^2)).^(1/2), where x is the coordinate along the halfspan of the wing, and k and k1 are factors that shape the ellipse. The lenght of the cord is
l = y_le + y_te. I need to solve two integrals, one just the length of the chord along the halfspan, and the other the length of the chord squared along the halfspan. My attempt in matlab looks like this:
ls = 0.25 : 0.01 : 0.5;
b = 3.5;
k = 7;
k1 = 1;
syms x

l = ((k1*ls/k).^2 – (k1*x*(ls/k)/(b/2)).^2).^(1/2) + (((k-k1)*(ls/k)).^2 – ((k-k1)*x*(ls/k)/(b/2)).^2).^(1/2);

S = int(l, 0, b/2) * 2
S_mod = eval(S)
S_mod = real(S_mod);
lsat = (2 ./ S_mod) .* int(l .^ 2, 0, b/2)
lsat_mod = eval(lsat)
The issue i keep running into is that the value for lsat_mod remains symbolic, while i need a vector of numbers. All advice is apreciated, thank you.I need to calculate the area and mean aerodynamic chord of a modified eliptical wing.
The folowing equations describe the leading edge y_le = ((ls/k).^2 – (x*(ls/k)/(b/2)).^2).^(1/2) and trailing edge l_te = (((k-k1)*(ls/k)).^2 – ((k-k1)*x*(ls/k)/(b/2).^2)).^(1/2), where x is the coordinate along the halfspan of the wing, and k and k1 are factors that shape the ellipse. The lenght of the cord is
l = y_le + y_te. I need to solve two integrals, one just the length of the chord along the halfspan, and the other the length of the chord squared along the halfspan. My attempt in matlab looks like this:
ls = 0.25 : 0.01 : 0.5;
b = 3.5;
k = 7;
k1 = 1;
syms x

l = ((k1*ls/k).^2 – (k1*x*(ls/k)/(b/2)).^2).^(1/2) + (((k-k1)*(ls/k)).^2 – ((k-k1)*x*(ls/k)/(b/2)).^2).^(1/2);

S = int(l, 0, b/2) * 2
S_mod = eval(S)
S_mod = real(S_mod);
lsat = (2 ./ S_mod) .* int(l .^ 2, 0, b/2)
lsat_mod = eval(lsat)
The issue i keep running into is that the value for lsat_mod remains symbolic, while i need a vector of numbers. All advice is apreciated, thank you. I need to calculate the area and mean aerodynamic chord of a modified eliptical wing.
The folowing equations describe the leading edge y_le = ((ls/k).^2 – (x*(ls/k)/(b/2)).^2).^(1/2) and trailing edge l_te = (((k-k1)*(ls/k)).^2 – ((k-k1)*x*(ls/k)/(b/2).^2)).^(1/2), where x is the coordinate along the halfspan of the wing, and k and k1 are factors that shape the ellipse. The lenght of the cord is
l = y_le + y_te. I need to solve two integrals, one just the length of the chord along the halfspan, and the other the length of the chord squared along the halfspan. My attempt in matlab looks like this:
ls = 0.25 : 0.01 : 0.5;
b = 3.5;
k = 7;
k1 = 1;
syms x

l = ((k1*ls/k).^2 – (k1*x*(ls/k)/(b/2)).^2).^(1/2) + (((k-k1)*(ls/k)).^2 – ((k-k1)*x*(ls/k)/(b/2)).^2).^(1/2);

S = int(l, 0, b/2) * 2
S_mod = eval(S)
S_mod = real(S_mod);
lsat = (2 ./ S_mod) .* int(l .^ 2, 0, b/2)
lsat_mod = eval(lsat)
The issue i keep running into is that the value for lsat_mod remains symbolic, while i need a vector of numbers. All advice is apreciated, thank you. symbolic, integral MATLAB Answers — New Questions

​

Leave a Reply

Your email address will not be published. Required fields are marked *