MATLAB Solve equtaion with sinh en coth in matlab

  • Thread starter Thread starter mrcannibal
  • Start date Start date
  • Tags Tags
    Matlab
AI Thread Summary
The discussion revolves around a coding issue related to solving a mathematical equation involving hyperbolic functions in a symbolic computation environment. The user encounters an error indicating that the argument must be of 'Type::Arithmetical' for the function sinh. A solution is proposed, suggesting that declaring the variables Bi and t as symbolic variables (syms) resolves the issue. This adjustment allows the code to function correctly, enabling the user to compute the desired numerical solution for C without further errors.
mrcannibal
Messages
1
Reaction score
0
Hi, I need the numerical solution of C. But i get an Error: argument must be of 'Type::Arithmetical' [sinh]! Can you help me the code please,I would be of great help!
Thanks

syms x

Bi = 0.43;

t = -16.9;

N = x/(2*Bi)+ t/2;

y = 2*(1-coth(x))*(cosh(x)-cosh(N))+x/((2*Bi)*exp(-N))+(1-coth(x)/(2*Bi))*x*sinh(x);

P = solve(y);

M = P/(2*Bi)+t/2;

C = (P^2/sinh(P)^2)*exp(-M)*(cosh(P)-cosh(M));
 
Physics news on Phys.org
Hi, declare Bi and t also as syms variables, it worked for me
 

Similar threads

Back
Top