How to plot implicit function in an iteration ?

조회 수: 1 (최근 30일)
Anshuman S
Anshuman S 2017년 12월 20일
댓글: Walter Roberson 2017년 12월 20일
for b= 5:1:40
f = @(o,i) sind(b+i) + sind(b+o)-( 1140/0.04 + sqrt ((1140/0.04 -2*sind(b)).^2 - (cosd(b- o)- cos(b +i)).^2));
fimplicit(f,[0 90 0 90])
hold on
end
  댓글 수: 1
Anshuman S
Anshuman S 2017년 12월 20일
편집: Anshuman S 2017년 12월 20일
I wanted to plot δi vs δo for different β values ranging from 5 to 40. and the δi & δo values ranging from 0 to 90 degrees. values for w = 2.4 m and d = 0.4 m .

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2017년 12월 20일
You accidentally used cos() in one place instead of cosd()
But even fixing that, there are no solutions over that range of values. The function is quadratic-like, and has a minima at [85, 85] (to within round-off) where it is roughly -57000. The maxima would be somewhere on the boundary of the [0 90 0 90] region, with a value that would be barely different.
  댓글 수: 2
Anshuman S
Anshuman S 2017년 12월 20일
편집: Anshuman S 2017년 12월 20일
I wanted to plot δi vs δo subjected to this equation for different β values ranging from 5 to 40. and the δi & δo values ranging from 0 to 90 degrees. values for w = 2.4 m and d = 0.4 m .
Walter Roberson
Walter Roberson 2017년 12월 20일
Look at your right hand side. The square root part is never negative (by convention), so the smallest that can contribute is 0. The w/d part is 2.4/0.4 = 6 . So in the case where the square root happens to come out as 0 you would have
sin(beta + delta_i) + sin(beta - delta_o) = 6
which is never possible for real-valued beta and delta_* .
If you reverse the values of w and d then there are solutions. Those solutions happen to lie along a slightly curved line, and the solutions for the various beta values overlap each other so it may be difficult to tell them apart with the plot you are doing.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by