Error using integral2Calc>integral2t/tensor (line 231) Input function must return ‘double’ or ‘single’ values. Found ‘sym’.
I’d like to know where the mistake in this code, and the solution
h = 0.00172; rho = 1620;
L = 100*h; c=L*L/4;
M=10; N=10;
syms xi eta
shape_w=sym(zeros(M,N)); x_m=sym(zeros(M,1)); y_n=sym(zeros(N,1));
for m=1:M
for n=1:N
x_m(m)=(xi^m)*(1+xi);
y_n(n)=(eta^n)*(1-eta)*(1+eta)^2;
shape_w(m,n)=x_m(m)*y_n(n);
end
end
fun=(shape_w*shape_w’);
M_w =c*(rho*h)*integral2(@(xi,eta)fun,-1,1,-1,1);I’d like to know where the mistake in this code, and the solution
h = 0.00172; rho = 1620;
L = 100*h; c=L*L/4;
M=10; N=10;
syms xi eta
shape_w=sym(zeros(M,N)); x_m=sym(zeros(M,1)); y_n=sym(zeros(N,1));
for m=1:M
for n=1:N
x_m(m)=(xi^m)*(1+xi);
y_n(n)=(eta^n)*(1-eta)*(1+eta)^2;
shape_w(m,n)=x_m(m)*y_n(n);
end
end
fun=(shape_w*shape_w’);
M_w =c*(rho*h)*integral2(@(xi,eta)fun,-1,1,-1,1); I’d like to know where the mistake in this code, and the solution
h = 0.00172; rho = 1620;
L = 100*h; c=L*L/4;
M=10; N=10;
syms xi eta
shape_w=sym(zeros(M,N)); x_m=sym(zeros(M,1)); y_n=sym(zeros(N,1));
for m=1:M
for n=1:N
x_m(m)=(xi^m)*(1+xi);
y_n(n)=(eta^n)*(1-eta)*(1+eta)^2;
shape_w(m,n)=x_m(m)*y_n(n);
end
end
fun=(shape_w*shape_w’);
M_w =c*(rho*h)*integral2(@(xi,eta)fun,-1,1,-1,1); how i can fix error using integral2calc integral2t/tensor (line 231)? MATLAB Answers — New Questions