'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

Réponses (1)

Honglei Chen
Honglei Chen le 13 Mar 2013

0 votes

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

Catégories

En savoir plus sur Guidance, Navigation, and Control (GNC) dans Centre d'aide et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by