Info

此问题已关闭。 请重新打开它进行编辑或回答。

I am getting the error using matrix"Error using + matrix diemension must agree" How I can remove this error?

1 次查看(过去 30 天)
I am Using the matrix which is given below.
XC=[-(i/(beta1*eta2))*((u2*diff(besselj(n,u2*r1)))+(1/r1)*besselj(n,u2*r1)), -(i/(beta1*eta2))*((u2*diff(bessely(n,u2*r1)))+(1/r1)*bessely(n,u2*r1)),0,0;... ((i*eta)/(omega*u0))*((u*diff(besselj(n,u*r1)))+(1/r1)*besselj(n,u*r1)),((i*eta)/(omega*u0))*((u*diff(bessely(n,u*r1)))+(1/r1)*bessely(n,u*r)),0,0;... besselj(n,u*r1), bessely(n,u*r1), 0,0;... ((eta*omega*e0)/beta1)*ne2^2*besselj(n,u2*r1), ((eta*omega*e0)/beta1)*ne2^2*bessely(n,u2*r1), 0,0];
  1 个评论
Geoff Hayes
Geoff Hayes 2014-10-28
Ritesh - please format the above code so that it is readable. Highlight the code portion and press the {} Code button.
As well, to make it easier to debug, break apart your one line of code into separate statements so that it may be easier to determine which matrix addition is causing the problem. You may also want to include the values for each of the variables that you are using - what is beta1, eta2, etc.?
Formatting the above, breaking down your code into multiple statements, and providing more information will go a long way to getting some help for your problem.

回答(0 个)

此问题已关闭。

Community Treasure Hunt

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

Start Hunting!

Translated by