matrix - how to multiply two unequal matrices in matlab? -
matrix - how to multiply two unequal matrices in matlab? -
c1=[1 2 3 4 5 6]; c2=[4 5 6 7 8 9 10]; c3=[3 5 7 11 12 13]; o1=intersect(c1,union(c2,c3)); o2=intersect(c2,union(c1,c3)); o3=intersect(c3,union(c1,c2)); p=(c1.*c2).*c3; nd21=1; nd22=2; nd23=3; cia1=1/(nd21); cia2=1/(nd22); cia3=1/(nd23); cip1=(c1-o1)/p; cip2=(c2-o2)/p; cip3=(c3-o3)/p; eavg1=(ecur1+ecur2+ecur3)/nd21; eavg2=(ecur1+ecur2+ecur3)/nd22; eavg3=(ecur1+ecur2+ecur3)/nd23;
i want multiply c1
, c2
unequal matrix. i'm getting next error:
??? error using ==> times matrix dimensions must agree. error in ==> batwsn @ 13 p=(c1.*c2).*c3;
the rule matrix multiplication 2 matrices can multiplied when number of columns in first equals number of rows in second. mathematical principle should not expect matlab it.
the closest can come pad 1 of matrices zeros dimensions match rules - but may not results expecting.
matlab matrix
Comments
Post a Comment