Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %% Object in Front of Concave Mirror
- % Determines the focal length image distance, magnification and magnitude
- % of the image height in a concave mirror
- % Inputs and Variables
- h = input('Height of Object\n');
- r = input('Radius of mirror\n');
- d = input('Distance of Object\n');
- % Outputs and Equations
- focal = r/2;
- i = focal*d/(d-focal);
- magf = -i/d;
- magn = magf*h;
- fprintf(['The focal length: %.3e m\n'...
- 'The image distance: %.3e m\n'...
- 'The magnification is: %.3e\n'...
- 'The image height is: %.3e m\n'], focal, i,magf,magn)
Advertisement
Add Comment
Please, Sign In to add comment