how to integrate the matrixs. i get an error
조회 수: 1 (최근 30일)
이전 댓글 표시
c=[45.2538 6.2982 6.3054 0 0 0; 13.5826 9.8541 6.4195 0 0 0; 13.6054 6.4180 9.8556 0 0 0; 0 0 0 10.6615 0 0; 0 0 0 0 11.2087 0; 0 0 0 0 0 26.9691];
m=@(a)cos(a); n=@(a)sin(a);
T=@(a)[1 0 0 0 0 0; 0 m^2 n^2 m.*n 0 0; 0 n^2 m^2 m*n 0 0; 0 -2*m.*n 2*m.*n m^2.-n^2 0 0; 0 0 0 0 m -n; 0 0 0 0 n m];
c_pn=@(a)((T')^-1)*(c*T^-1);
c_pmnc=integral(c_pn,0,2*pi);
댓글 수: 0
채택된 답변
Walter Roberson
2018년 8월 4일
c=[45.2538 6.2982 6.3054 0 0 0; 13.5826 9.8541 6.4195 0 0 0; 13.6054 6.4180 9.8556 0 0 0; 0 0 0 10.6615 0 0; 0 0 0 0 11.2087 0; 0 0 0 0 0 26.9691];
m=@(a)cos(a); n=@(a)sin(a);
T=@(a)[1 0 0 0 0 0; 0 m(a)^2 n(a)^2 m(a).*n(a) 0 0; 0 n(a)^2 m(a)^2 m(a)*n(a) 0 0; 0 -2*m(a).*n(a) 2*m(a).*n(a) m(a)^2-n(a)^2 0 0; 0 0 0 0 m(a) -n(a); 0 0 0 0 n(a) m(a)];
c_pn=@(a)((T(a)')^-1)*(c*T(a)^-1);
c_pmnc = integral(c_pn, 0, 2*pi, 'ArrayValued', true);
This will get you
Warning: Reached the limit on the maximum number of intervals in use. Approximate bound on error is 2.2e+23. The integral may not exist, or it may be difficult to approximate numerically to
the requested accuracy.
This will occur because most of your entries have integrals that are infinite or indeterminate. Most of the numeric values you get will be nonsense.
Please re-check your code. In the places you have an array ^-1 do you really mean you want the matrix inverse? If so then you should recode in terms of the \ operator for improved reliability.
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!