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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Get Started with MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!