Trigonometric non linear equation

1 次查看(过去 30 天)
clc;close all;clear all;
theta=30;
k=360;
h=0.5555;
After running the above program the answer of F iam getting 0.0730
Suppose the value of 'h' is unknown.
So, which function i used to get the value of 'h' where the below equation is equal to zero.
((cosd(theta).*(sind(k*h).^2)) - (2*(sind(k.*h.*cosd(theta)).^2)))==0

采纳的回答

Star Strider
Star Strider 2022-5-7
Try something like this —
theta=30;
k=360;
h=0.5555;
F = @(h) ((cosd(theta).*(sind(k*h).^2)) - (2*(sind(k.*h.*cosd(theta)).^2)));
for k1 = 1:360
h_val(k1) = fzero(F,k1);
end
Uh_val = uniquetol(h_val, 0.01)
Uh_val = 1×79
1.0891 5.1140 9.8927 14.3144 18.4859 23.0537 27.0778 31.3009 35.8810 39.9061 45.7425 50.6869 54.7193 58.9369 64.0490 69.9192 73.9434 78.5763 82.6771 88.9498 92.9735 97.6948 101.7456 105.5893 110.3674 115.3914 119.5467 124.6211 128.8515 132.8778
There are infinity of solutions. These are some of them.
.
  2 个评论
Sun Heat
Sun Heat 2022-5-7
Thanks for replying..
will you please tell me the function which provide the value of 'h==0.555' as a answer
if we put same value as
theta=30; k=360;
((cosd(theta).*(sind(k*h).^2)) - (2*(sind(k.*h.*cosd(theta)).^2)))==0.0730
Star Strider
Star Strider 2022-5-7
The value of ‘F’ at that value of ‘h’ is not zero, so it will be necessary to adjust other parameters of the funciton in order to satisfy that requirement —
theta=30;
k=360;
h=0.5555;
F = @(h) ((cosd(theta).*(sind(k*h).^2)) - (2*(sind(k.*h.*cosd(theta)).^2)));
fval = F(0.555)
fval = 0.0699
I leave that to you.
.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Solver Outputs and Iterative Display 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by