Error with double integration

I got error while solving the following equation.
clear all; close all; clc
syms a b;
ae = 0.5;
be = 0.6;
R = 0.01;
E = (2.1*10^11)./(1-0.3);
A = pi*E*R;
k = (6*1.3)./(7+6*0.3);
m = 1.3;
h =@(b) ae./(2*sqrt(1-2*b^2));
F1 = sqrt(tan((pi*h(b))/2)./((pi*h(b))/2)).*(0.752+2.02*h(b)+0.37*(1-sin((pi*h(b))/2)).^3)./cos((pi*h(b))./2);
F2 = sqrt(tan((pi*h(b))/2)./((pi*h(b))/2)).*(0.923+0.199*(1-sin((pi*h(b))/2)).^4)./cos((pi*h(b))./2);
F3 = (1.122-0.561*h(b)+0.085*(h(b)^2)+0.18*(h(b)^3))./sqrt(1-h(b));
F4 = sqrt(tan((pi*h(b))/2)./((pi*h(b))/2));
C11 = @(a, b)((1/A).*((a/2).*(((F1(b)).^2)+m.*((F4(b)).^2))))
g11 = integral2(C11(a,b),0,ae,-be,be)
Any kind of help will be highly appriciated.

回答(2 个)

madhan ravi
madhan ravi 2019-2-28
编辑:madhan ravi 2019-2-28
Just make the below changes:
h=matlabFunction(h); % remove @(b) in h
F1=@(b)...
F4=@(b)...
%Remove (a,b) from C11 in line g11
KSSV
KSSV 2019-2-28
编辑:KSSV 2019-2-28
YOu need not to use syms
ae = 0.5;
be = 0.6;
R = 0.01;
E = (2.1*10.^11)./(1-0.3);
A = pi*E*R;
k = (6*1.3)./(7+6*0.3);
m = 1.3;
h =@(b) ae./(2*sqrt(1-2*b.^2));
F1 = @(b) sqrt(tan((pi*h(b))/2)./((pi*h(b))/2)).*(0.752+2.02*h(b)+0.37*(1-sin((pi*h(b))/2)).^3)./cos((pi*h(b))./2);
F2 = @(a) sqrt(tan((pi*h(b))/2)./((pi*h(b))/2)).*(0.923+0.199*(1-sin((pi*h(b))/2)).^4)./cos((pi*h(b))./2);
F3 = @(b) (1.122-0.561*h(b)+0.085*(h(b).^2)+0.18*(h(b).^3))./sqrt(1-h(b));
F4 = @(b) sqrt(tan((pi*h(b))/2)./((pi*h(b))/2));
C11 = @(a, b)((1/A).*((a/2).*(((F1(b)).^2)+m.*((F4(b)).^2))))
g11 = integral2(C11,0,ae,-be,be)
I strongly advice you to check the code and confirm, the result. Read about intergal2.

类别

帮助中心File Exchange 中查找有关 Symbolic Math Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by