Matrix error in a simple integral
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Hi guys
Can you please help what's wrong here?
clear all
clc
syms x y v L k
a=1/L-y/L^2;
b=y/L^2;
c=k/L-x/L^2;
d=(k-1)/L-x/L^2;
w=(1-v)/2;
A=[c^2*w+a^2,a*c*v+a*c*w;-c*d*w-a^2,-a*d*v-a*c*w,-c^2*w+a*b,c*b*w-a*c*v,c*d*w-a*b,a*d*v-c*b*w; a*c*v+a*c*w,a^2*w+c^2,-a*c*v-a*d*w,-a^2*w-c*d,c*b*v-a*c*w,a*b*w-c^2,a*d*w-c*b*v,-a*b*w+c*d; -c*d*w-a^2,-a*c*v-a*d*w,d^2*w+a^2,a*d*v+a*d*w,c*d*w-a*b,a*c*v-d*b*w,-d^2*w+a*b,d*b*w-a*d*v;-a*d*v-a*c*w,-a^2*w-c*d,a*d*v+a*d*w,a^2*w+d^2,a*c*w-d*b*v,-a*b*w+c*d,d*b*v-a*d*w,a*b*w-d^2;-c^2*w+a*b,c*b*v-a*c*w,c*d*w-a*b,a*c*w-d*b*v,c^2*w+b^2,-c*b*v-c*b*w,-c*d*w-b^2,c*b*w+d*b*v;c*b*w-a*c*v,a*b*w-c^2,a*c*v-d*b*w,-a*b*w+c*d,-c*b*v-c*b*w,b^2*w+c^2,c*b*v+d*b*w,-b^2*w-c*d;c*d*w-a*b,a*d*w-c*b*v,-d^2*w+a*b,d*b*v-a*d*w,-c*d*w-b^2,c*b*v+d*b*w,d^2*w+b^2,-d*b*v-d*b*w;a*d*v-c*b*w,-a*b*w+c*d,d*b*w-a*d*v,a*b*w-d^2,c*b*w+d*b*v,-b^2*w-c*d,-d*b*v-d*b*w,b^2*w+d^2];
X=int(A,x,0,L);
2 Commenti
Dyuman Joshi
il 18 Giu 2022
Your grouping of terms in A is incorrect to define it as a matrix.
Either you calculate the integral using int individually or define a proper matrix and integrate the whole matrix as one.
Risposte (0)
Vedere anche
Categorie
Scopri di più su Creating and Concatenating Matrices in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!