Error in Plotting The Surface graph.
49 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Shivam Bajpai
le 24 Avr 2022
Commenté : Walter Roberson
le 25 Avr 2022
clc
clear all
close all
%% Aircraft Parameters
b= 222.6664; %ft
l=247.9163; % ft
S=6200; %ft^2
CR=45.4165; %ft
CT=15.332; %ft
AR=7.3;
TR=0.34;
lamda= 25; %degree
W=650000; %pound
mach=0.77;
sound_speed=967.52; %in feet/sec
density=5.87; % in slug/ft^3
cruise_weight=650000; %in pounds
%% Wake model
b_red=(3.14/4)*b;
velocity=mach*sound_speed;
Circulation=cruise_weight/(velocity*density*b_red);
y=-0.3*b:9:0.1*b;
z=-0.3*b:9:0.1*b;
[y,z]=meshgrid(y,z);
x=2*b +zeros(10,10);
rc=5;
% %%upwash_avg
syms s
chord_length=((2*S)/(b*(1+TR))*(1-(1-TR)*(2*s)/b));
right_wing=(Circulation/(4*3.14))*((y+s)./( (y+s).^2+ z.^2 + rc.^2)).*(1+(x./sqrt(x.^2+(y+s).^2+z.^2)))*chord_length;
left_wing=(Circulation/(4*3.14))*((y+b+s)./( (y+b+s).^2+ z.^2 + rc.^2)).*(1+(x./sqrt(x.^2+(y+b+s).^2+z.^2)));
I = (1/b)*((left_wing+right_wing)*chord_length);
qwe=int(I,s,0,b);
surf( y/b,z/b,qwe)
%%Error is Showing
Error using matlab.graphics.chart.primitive.Surface
Invalid parameter/value pair arguments.
Error in surf (line 145)
hh = matlab.graphics.chart.primitive.Surface(allargs{:});
Error in research_ff (line 38)
surf( y/b,z/b,qwe)
>>
0 commentaires
Réponse acceptée
Walter Roberson
le 24 Avr 2022
qwe=int(I,s,0,b);
That is symbolic
surf( y/b,z/b,qwe)
surf cannot handle symbolic arguments, even if the symbols could be fully approximated as double.
You need to double(qwe) if it does not contain any free variables after integrating. If it contains free variables then fsurf()
1 commentaire
Walter Roberson
le 25 Avr 2022
clc
clear all
close all
%% Aircraft Parameters
b= 222.6664; %ft
l=247.9163; % ft
S=6200; %ft^2
CR=45.4165; %ft
CT=15.332; %ft
AR=7.3;
TR=0.34;
lamda= 25; %degree
W=650000; %pound
mach=0.77;
sound_speed=967.52; %in feet/sec
density=5.87; % in slug/ft^3
cruise_weight=650000; %in pounds
%% Wake model
b_red=(3.14/4)*b;
velocity=mach*sound_speed;
Circulation=cruise_weight/(velocity*density*b_red);
y=-0.3*b:9:0.1*b;
z=-0.3*b:9:0.1*b;
[y,z]=meshgrid(y,z);
x=2*b +zeros(10,10);
rc=5;
% %%upwash_avg
syms s
chord_length=((2*S)/(b*(1+TR))*(1-(1-TR)*(2*s)/b));
right_wing=(Circulation/(4*3.14))*((y+s)./( (y+s).^2+ z.^2 + rc.^2)).*(1+(x./sqrt(x.^2+(y+s).^2+z.^2)))*chord_length;
left_wing=(Circulation/(4*3.14))*((y+b+s)./( (y+b+s).^2+ z.^2 + rc.^2)).*(1+(x./sqrt(x.^2+(y+b+s).^2+z.^2)));
I = (1/b)*((left_wing+right_wing)*chord_length);
qwe = vpaintegral(I, s, 0, b);
whos
surf( y/b, z/b, double(qwe))
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Particle & Nuclear Physics dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!