I keep getting Undefined function or method 'mtimes' for input arguments of type 'cell'.

h=2;
[V] = fuelvol1( h )
and the function file is
function[V] = fuelvol1( h )
%
global r H L
r=0.95; %feet
H=2.0; %ft
L=5.0; %ft
d=h-H;
A=(2*r*L*H);
B=(r-d)/r;
C=2*r*d;
D=r-d;
V =A+{(r*r*acos(B))-(D*(C-(d*d)))^0.5}*L;

답변 (1개)

per isakson
per isakson 2017년 10월 11일
이동: Sabin 2024년 12월 13일
The error message is correct, multiplication is not defined for cell. Replace
V = A+{(r*r*acos(B))-(D*(C-(d*d)))^0.5}*L;
by
V = A+((r*r*acos(B))-(D*(C-(d*d)))^0.5)*L;

카테고리

도움말 센터File Exchange에서 Data Import and Analysis에 대해 자세히 알아보기

태그

질문:

2017년 10월 11일

이동:

2024년 12월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by