Not able to integrate a matrix.
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (1)
Stephan
am 18 Aug. 2020
Bearbeitet: Stephan
am 18 Aug. 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 Kommentare
Siehe auch
Kategorien
Mehr zu Calculus finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!