Question
The following script land calls function to: 1.) prompt the user for a land area in acres 2.) calculate and return the area in hectares
The following script land calls function to:
1.) prompt the user for a land area in acres
2.) calculate and return the area in hectares and in square miles
3.) print the results
One acre is 0.4047 hectares. One square mile is 640 acres. assume that the last function, that prints, exists--you do not have to do anything for that function. You are to write the entire function that calculates and returns the area in hectares and square miles, and write just a function stub for the function that prompts the user and reads. Do not write the actual contents of this function; just write a sub!
land.m
inacres = askacres;
[sqmil, hectares] = convacres(inacres);
dispareas(inacres, sqmil, hectares) %Assume this exists
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started