It shows: Undefined function 'permute' for input arguments of type 'function_handle' when i solve the double integration with trapezoidal method. Can I know how to solve this?

1 Ansicht (letzte 30 Tage)
clear all
clc
Q=((2000*42*(3.785*10^-3))/(1*24*3600)); %volumetric flowrate of fluid in m3/s
D=(4*0.0254); %inner diameter of pipe in m
A=(pi()*(D^2))/4; %cross sectional area of pipe in m2
uave=Q/A; %average velocity in m/s
R=D/2; %radius of the pipe in m
radius=[0:0.0002:R];
dita=[0:pi():2*pi()];
[RADIUS,DITA]=meshgrid(radius,dita);
F=@(RADIUS,DITA) RADIUS.*(1-((RADIUS./R).^2));
I=trapz(dita,trapz(radius,F,2));
%umax is the maximum velocity in m/s
umax=uave/I
%u is the velocity of pipe in m/s
u=umax*(1-((radius./R).^2));
  2 Kommentare
madhan ravi
madhan ravi am 16 Feb. 2019
Bearbeitet: madhan ravi am 16 Feb. 2019
F=@(RADIUS,DITA) RADIUS.*(1-((RADIUS./R).^2));
Why did you create a function handle with DITA it's used nowhere in the line?
In the next line you don't evaluate the function handle.
What's the reason for creating a function handle?
Sylvia Tan
Sylvia Tan am 16 Feb. 2019
Thanks for your reply.
DITA will become a variable after it undergoes integration. F is the function where it has not undergone any integration so it does not appear in the equation.
Thank you.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Fluid Dynamics finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by