'mtimes' error and how to fix it

I am writing code and this error keeps popping up and I am not sure how to fix it:
deltap=2000;
mublood=.004;
L=30;
R=.005;
Rc=0:.0001:.005;
zi=Rc/R;
F=@(zi)1-16/7*sqrt(zi)+4/3*zi-1/21*zi.^4;
Q=((pi*R^4*deltap)/(8*(mublood)*L))*F;
plot(Q,Rc);
xlabel('Flow Rate');
ylabel('Changing R');
When I hit run it pops up with this error:
DRAFTFOR4_3
Undefined function 'mtimes' for input arguments of type 'function_handle'.
Error in DRAFTFOR4_3 (line 8)
Q=((pi*R^4*deltap)/(8*(mublood)*L))*F;
How do I fix it? Thanks

回答 (1 件)

Honglei Chen
Honglei Chen 2013 年 3 月 13 日

0 投票

Your F function requires an input, so you need to call it with an input, such as
F(3)

カテゴリ

ヘルプ センター および File ExchangeIntroduction to Installation and Licensing についてさらに検索

製品

タグ

質問済み:

2013 年 3 月 13 日

Community Treasure Hunt

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

Start Hunting!

Translated by