printing succsessive values
2 views (last 30 days)
Show older comments
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 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!