'mtimes' error and how to fix it
2 views (last 30 days)
Show older comments
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
0 Comments
Answers (1)
Honglei Chen
on 13 Mar 2013
Your F function requires an input, so you need to call it with an input, such as
F(3)
See Also
Categories
Find more on Guidance, Navigation, and Control (GNC) in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!