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
조회 수: 2 (최근 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!