error in matrix multiplication and integration
2 次查看(过去 30 天)
显示 更早的评论
%%
clc;
clear;
syms x;
%pi = 180.;
% syms y_x;
% syms y_x_das;
L = 100.;
E = 29000. ;
c = 0.1*L;
d_0 = 5.;
d_1 = 2.*d_0;
d_x = 2.*d_0*(x/(2.*L));
b = 2.;
I_z = (b*d_x.^3)/12.;
G = 11000.;
A_x = b*d_x;
As = 5/6*A_x;
y_x = c*sin(2*pi*x/L);
y_x_das = diff(y_x);
theta_2 = atan(y_x_das);
Q_a = [-cos(theta_2) -sin(theta_2) 0];
Q_s = [-sin(theta_2) -cos(theta_2) 0];
Q_b = [-c*sin((2*pi*x)/L) x -1];
%%
%flexibility matrix
d1= sqrt(1 + y_x_das.^2).*((Q_a'.*Q_a)./(A_x*E));
d1_int = integral(@(x) d1(), 0, 100., 'ArrayValued', 1);
9 个评论
Walter Roberson
2022-10-28
mat2str() will show it with just one []
Note: mat2str() may lose the bottom bit of numbers. format long g loses the bottom bit of numbers. If you need to be able to exactly reproduce the array then you will need to create your own function to convert it.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Particle & Nuclear Physics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!