Create a script circle.m that will which receives diameter as an argument and returns two outputs area and circumference. your script should prompt to give diameter
5 次查看(过去 30 天)
显示 更早的评论
function[circumference, area]=circleArea(diameter)
circumference=pi*diameter;
area=1/4*pi*diameter;
end
Not sure what to do from here. How do I prompt to put a diameter in a regular script?
0 个评论
回答(1 个)
Cris LaPierre
2022-9-22
You are creating a function, while the instructions say to create a script.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!