Warning: Function behaves unexpectedly on array inputs. To improve performance, properly vectorize your function to return an output with the same size and shape as the input arguments.
古いコメントを表示
I don't understand the problem in this code:
Roi=750;
Row=1000;
R=Row/Roi;
r=50;
d=50;
H0=50;
l=5;
b=5;
a=(2*l*H0/pi)^0.5;
Area=pi*a^2;
Vol=Area*H0;
Omega=1;
va=(3*(pi)^(3/2))/(16*sqrt(2))*(Omega*sqrt(l*H0))/(1+pi/4*R*(l/b));
J=@(x,y)(besselj(0,x.*y*a/d)).*sqrt(1-y.^2).*y;
B=@(x)integral(@(y)J(x,y),0,1)
J0=@(x)besselj(0,x*r/d);
F=@(t)integral(@(x)J0(x).*B(x).*sqrt(x.*tanh(x))*sin(sqrt(9.81/d*t.^2).*x.*tanh(x)).*x,0,10)
e=@(t)-2*(a/d)^3*(sqrt(2*H0/d-(a/d*b/a)))/(1+2/3*R*a/b).*F(t)
fplot(e)
Command window
Warning: Function behaves unexpectedly on array inputs. To improve performance, properly vectorize your function
to return an output with the same size and shape as the input arguments.
> In matlab.graphics.function.FunctionLine>getFunction
In matlab.graphics.function.FunctionLine/updateFunction
In matlab.graphics.function.FunctionLine/set.Function_I
In matlab.graphics.function.FunctionLine/set.Function
In matlab.graphics.function.FunctionLine
In fplot>singleFplot (line 232)
In fplot>@(f)singleFplot(cax,{f},limits,extraOpts,args) (line 191)
In fplot>vectorizeFplot (line 191)
In fplot (line 161)
In Case41 (line 44)
Warning: Error updating FunctionLine.
The following error was reported evaluating the function in FunctionLine update: Inner matrix dimensions must
agree.
2 件のコメント
You need to learn this:
Your functions include a mixture of matrix and array operations. Is this intentional?
Tommaso Attili
2018 年 10 月 7 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Bessel functions についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!