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

2 ビュー (過去 30 日間)
Michele  Thompson
Michele Thompson 2017 年 10 月 10 日
回答済み: Walter Roberson 2017 年 10 月 11 日
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

カテゴリ

Help Center および File ExchangeFinancial Toolbox についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by