Info
此问题已关闭。 请重新打开它进行编辑或回答。
How to create new script which contains nonlinear algebraic equation including integral?
1 次查看(过去 30 天)
显示 更早的评论
I want to get variables which are A, lamda2, lamda4, however, it doesn't come up with method about coding.
Trapezoidal rule with repeating code should be used to get those variables, I guess, but I have no idea about it all.
Please let me know how to start or outline code.
0 个评论
回答(1 个)
Surya Talluri
2020-9-2
I understand that you wants to implement the integrals in MATLAB. You can use Symbolic Math Toolbox to implement it
syms A lamda2 lamda4 alpha beta gamma P2(beta) P4(beta) f(alpha,beta,gamma) F(beta)
int1 = int(int(int(f(alpha,beta,gamma)*sin(beta),beta, 0,pi),alpha ,0,2*pi),gamma,0,2*pi) == 1
int2 = int(int(int(P2(cos(beta))*F(beta)*sin(beta),beta, 0,pi),alpha ,0,2*pi),gamma,0,2*pi) == 0.530
int3 = int(int(int(P4(cos(beta))*F(beta)*sin(beta),beta, 0,pi),alpha ,0,2*pi),gamma,0,2*pi) == 0.348
eqn = f(alpha,beta,gamma) == F(beta);
F(beta) = A*exp(-lamda2*P2(cos(beta))+lamda4*P4(cos(beta)))
since P2(cos(beta)) and P4(cos(beta)) are functions of beta, we need more information about them to solve the integrals.
You can refer to following documentation for further understanding of the toolbox:
0 个评论
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!