Why i am getting Error using * Inner matrix dimensions must agree.

I have a code for an equation but I am getting error" matrix dimensions must agree".I want to plot three different TMI graph in one figure for three different a_result. But every time i run the m file i get error.
Matrix dimensions must agree.
Error in alpha (line 96)
TMI_th=kT*Ue2.*(Ue2-Us2).*(lambda./d_core).^2./(4*pi.*n_eff1.*dn_dT.*a_result); % TMI threshold (W)

Answers (1)

Type the following at the command line:
dbstop if error
Then run your code. When you encounter the error, the code will pause with all current variables intact. Examine the variables in the expression to see where the size mismatch is occurring and then backtrack in your code to figure out why this is happening.

Categories

Find more on Operators and Elementary Operations in Help Center and File Exchange

Asked:

on 30 Nov 2017

Answered:

on 30 Nov 2017

Community Treasure Hunt

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

Start Hunting!