Matlab ??How to make to same size matrixes plus together

Thread Starter

Jane0329

Joined Sep 12, 2011
3
G matrix and C matrix,
I wanna get A matrix equals to G matrix plus C matrix times s,
which s is j*w.

Just program A=G+s*C, matlab shows 'Inner matrix dimensions must agree.'
 

steveb

Joined Jul 3, 2008
2,436
G matrix and C matrix,
I wanna get A matrix equals to G matrix plus C matrix times s,
which s is j*w.

Just program A=G+s*C, matlab shows 'Inner matrix dimensions must agree.'
That should work, but your G and C matrix must be of the same size/dimensions, and your s variable should be a complex number, not a matrix.

If it's still not working, list your code here.
 

Thread Starter

Jane0329

Joined Sep 12, 2011
3
That should work, but your G and C matrix must be of the same size/dimensions, and your s variable should be a complex number, not a matrix.

If it's still not working, list your code here.
Thanks, I found my 's' is a matrix not a conplex number...:D
 
Top