Error calculating an integral: ""Input function must return 'double' or 'single' values. Found 'sym'."" How can i get the %% integral(F_potext,0,a) %% done? Thanks for the help :)
Ältere Kommentare anzeigen
a=3; b=(2/3)*a; h=0.01;
q0 = -1000;
syms x y z c
X_m = [0 0 (x/a)^2 (x/a)^3 (x/a)^4];
Y_n = [0 0 (y/b)^2 (y/b)^3 (y/b)^4];
fn = sym([0 0 0 0 0]);
for i=1:5
for j=1:5
fn(i) = fn(i) + X_m(i)*Y_n(j);
end
end
Pot_ext = [0 0 0 0 0];
for i=1:5
F_potext = @(x) ((q0.*x)./a)*subs(fn(i),y,2*b/3);
Pot_ext(i) = integral(F_potext,0,a)
end
Akzeptierte Antwort
Weitere Antworten (1)
Abhishek Gupta
am 18 Dez. 2020
0 Stimmen
Hi,
Referring to the following MATLAB Answers, which might help you in resolving the issue: -
Kategorien
Mehr zu Calculus finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!