# How Can I solve this problem?

1 ビュー (過去 30 日間)
Dunker Yair Callo Roque 2021 年 4 月 9 日

H = 3;
P = 100;
ls = atan(P/H);
fun = @(x) (2*(H/P)^2)*(x + (4/3)*x^3 + (17/15)*x^5 + (248/315)*x^7);
q = integral(fun,0,ls);
This is the error:
Error using ^ (line 51)
Incorrect dimensions for raising a matrix to a power. Check that the matrix is
square and the power is a scalar. To perform elementwise matrix powers, use
'.^'.
Error in distancia>@(x)(2.*(H/P)^2)*(x+(4/3)*x^3+(17/15)*x^5+(248/315)*x^7)
(line 4)
fun = @(x) (2.*(H/P)^2)*(x + (4/3)*x^3 + (17/15)*x^5 + (248/315)*x^7);
Error in integralCalc/iterateScalarValued (line 314)
fx = FUN(t);
[q,errbnd] = iterateScalarValued(u,tinterval,pathlen);
Error in integralCalc (line 75)
Error in integral (line 88)
Q = integralCalc(fun,a,b,opstruct);
Error in distancia (line 5)
q = integral(fun,0,ls);

サインインしてコメントする。

### 回答 (1 件)

KSSV 2021 年 4 月 9 日

H = 3;
P = 100;
ls = atan(P/H);
fun = @(x) (2*(H/P)^2)*(x + (4/3)*x.^3 + (17/15)*x.^5 + (248/315)*x.^7);
q = integral(fun,0,ls);

サインインしてコメントする。

### Community Treasure Hunt

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

Start Hunting!