error in matrix multiplication and integration
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
%%
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 Commenti
Walter Roberson
il 28 Ott 2022
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.
Risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!