Clear Filters
Clear Filters

Matrix error in a simple integral

1 view (last 30 days)
Sa Moha
Sa Moha on 18 Jun 2022
Commented: Sa Moha on 18 Jun 2022
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 Comments
Dyuman Joshi
Dyuman Joshi on 18 Jun 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.

Sign in to comment.

Answers (0)

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Products


Release

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!