I keep getting Error: Function definitions are not permitted at the prompt or in scripts.

function[V] = fuelvol1( h )
%
%
global r H L
r=0.95;%feet
H=2.0;%ft
L=5.0;%ft
d=h-H;
V =(2*r*L*H)+{r*r*acos((r-d)/r)-((r-d)*((2*r*d)-(d*d))^0.5}*L;

답변 (1개)

Walter Roberson
Walter Roberson 2017년 10월 11일
You have to store that code in a file named fuelvol1.m

카테고리

도움말 센터File Exchange에서 App Building에 대해 자세히 알아보기

태그

질문:

2017년 10월 10일

답변:

2017년 10월 11일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by