printing succsessive values
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi I am fairly new to matlab and i have been given some questions. I have done questions 1,2 and 3 but cannot work out question 4. Any help would be much appreciated, sorry if iv been a bit vague.
1. Rearrange the equation to make the subject f:
2. Create a function segment(A,r) to find the arc subtended for a given area, and radius.
3. Make sure your working directory is in the Matlab path, and then solve for phi for Area of 0.1 m2, and a radius of 0.3 m.
4. Make your program print out the successive values of phi.
function phi = fragment(A,r)
% fragment the angle subtended by a circular segment
% fragment(A,r) is the fragment having an area A, and radius r.
% area of segment A = r^2 * (phi – sin(phi))/2
phi1 = 2*A/r^2;
phi2=phi1;
phi = sin(phi2) + phi1;
while abs(phi - phi2) > 0.0001
phi2=phi;
phi = sin(phi2) + phi1;
end
Many thanks Si
댓글 수: 0
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!