find the minimum value of x that corresponds to maximum value of theta

3 次查看(过去 30 天)
Hello , I have :
x=30:0.5:300;
h=180;
hypot=sqrt(x.^2+h.^2);
phi=asind(h./hypot);
theta=90-phi;
Now , I want to find the minimum value of x that corresponds to maximum value of theta. How can I do this?
Thanks!

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2013-2-13
编辑:Azzi Abdelmalek 2013-2-13
[~,idx]=max(theta)
out=x(idx)
  3 个评论
Azzi Abdelmalek
Azzi Abdelmalek 2013-2-13
How it works: Example
x=[1 2 3 4 5 6]
y=[10 20 1 21 15 2]
The maximum value of y is 21, it corresponds to index 4, which correspond in x to x(4)
[max_value,idx]=max(y)
out=x(idx)

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Trigonometry 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by