Not able to integrate a matrix.
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
HI, I want to integrate an equation 'I', but matlab shows errors while executing it.
syms theta;
m = cos(theta);
n = sin(theta);
T = [m^2 n^2 0 0 0 -m*n; n^2 m^2 0 0 0 m*n; 0 0 1 0 0 0; 0 0 0 m n 0; 0 0 0 -n m 0; 2*m*n -2*m*n 0 0 0 m^2-n^2];
Cbar_PMNC = (inv(T))*C_nc*T';
Y = Cbar_PMNC*((R^2-a^2)/2);
I = integral(@(theta)Y,0,2*pi);
0 commentaires
Réponses (1)
Stephan
le 18 Août 2020
Modifié(e) : Stephan
le 18 Août 2020
You missed to define some values, for generality i setted them to be symbolic variables. Also integral is a function for numeric integration, for symbolic integration use int:
syms theta C_nc R a
m = cos(theta);
n = sin(theta);
T = [m^2 n^2 0 0 0 -m*n; n^2 m^2 0 0 0 m*n; 0 0 1 0 0 0;...
0 0 0 m n 0; 0 0 0 -n m 0; 2*m*n -2*m*n 0 0 0 m^2-n^2];
Cbar_PMNC = (inv(T))*C_nc*T';
Y = Cbar_PMNC*((R^2-a^2)/2);
I = int(Y,0,2*pi)
gives:
I =
[ (5*pi*C_nc*(R^2 - a^2))/8, (3*pi*C_nc*(R^2 - a^2))/8, 0, 0, 0, 0]
[ (3*pi*C_nc*(R^2 - a^2))/8, (5*pi*C_nc*(R^2 - a^2))/8, 0, 0, 0, 0]
[ 0, 0, pi*C_nc*(R^2 - a^2), 0, 0, 0]
[ 0, 0, 0, 0, 0, 0]
[ 0, 0, 0, 0, 0, 0]
[ 0, 0, 0, 0, 0, -(pi*C_nc*(R^2 - a^2))/2]
0 commentaires
Voir également
Catégories
En savoir plus sur Calculus dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!