Plotting error 'Data must be numeric, datetime, duration or an array convertible to double.'
Show older comments
Hi all,
Im trying to plot 3 different values (ai,Gamma,cl) on the same plot vs. y (from -3 to 3) but i keep getting an error that im not sure how to resolve. Im quite a novice at matlab so im sure theres somehting obvious that im just not seeing, but any help is greatly appreciated. Thanks in advance.
clc
clear
N = 19;
AR = 6;
n =1:2:N;
b = 6;
Vinf = 1;
c = 1;
deltay = b./(N+1);
y0n = -(b./2)+n.*deltay;
syms alpha
A = sym('A', [1, N]);
A = A(1:2:end);
Pi = sym(pi);
theta = (linspace((Pi/6),(Pi/2),numel(n)).');
S1 = sum(A.*sin(n.*(theta)));
S2 = sum(n.*A.*(sin(n.*(theta))./sin((theta))));
eq1 = (2*AR/pi)*S1+S2 == alpha;
[A,b] = equationsToMatrix(eq1, A);
x = linsolve (A,b);
An = vpa(x)
ai = sum(n.*A.*(sin(n.*(theta))./sin((theta))));
Gamma0 = ai*2*b*Vinf;
Gamma = Gamma0*sqrt(1-(2*y0n./b).^2);
cl = 2*pi*(10-ai);
y = linspace(-3,3,10);
plot (ai,y,'r',Gamma,y,'g',cl,y,'b')
Accepted Answer
More Answers (0)
Categories
Find more on Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!