Info

This question is closed. Reopen it to edit or answer.

solving a non linear equation that has constants that must be passed into the equation

1 view (last 30 days)
I need to solve the following equation:
(1/T)*(3*Tc*J*Brill(x,J)/(J+1) + g*muB*J*B/kB + (9/5)*(((2*J+1)^4)-1)*Tc*nu*((Brill(x,J))^3)/((2*J+2)^4)) - x = 0;
Brill(x,J) = (0.5/J)*((2*J+1)*coth((J+0.5)*x/J)-coth(0.5*x/J));
The issue I am having with solve, and fsolve is that the above equation has constants that need to be passed into the function, since these are material properties and I have multiple materials that I want to be able to run this code on.
Also I want to calculate x for a range of T (temperature) and B (magnetic field) values.
Any help would be greatly appreciated.
Cheers, Oliver

Answers (1)

Matt J
Matt J on 11 Jul 2013
  2 Comments
David Campbell
David Campbell on 11 Jul 2013
That link was somewhat useful, but I already was passing in parameters that way. The issue is when I try to use solve or fsolve i get an error message saying: 'Not enough input arguments'
Matt J
Matt J on 11 Jul 2013
Edited: Matt J on 12 Jul 2013
Can't see how that would happen if you were following the guidelines in the link. You should consider showing your code and full, copy/pasted error messages so we know precisely what they are and which functions are issuing them.

Community Treasure Hunt

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

Start Hunting!