Finding angles with optimizaiton

Hello,
I am new to Matlab and would like to find the closest angles to this relationship
How can I do this with the optimization tools in matlab?
Best Regards

回答(1 个)

You need at least two equations to find a unique solution. For a single equation, fix the value of one of these variables
theta = 0.5;
fun = @(phi) sin(theta)^2*cos(phi)^2;
phi = fsolve(fun, rand())

类别

帮助中心File Exchange 中查找有关 Problem-Based Optimization Setup 的更多信息

提问:

MmO
2020-12-8

Community Treasure Hunt

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

Start Hunting!

Translated by