Inner matrix dimensions must agree.

1 visualización (últimos 30 días)
Ishan
Ishan el 16 de Nov. de 2014
Respondida: Roger Wohlwend el 18 de Nov. de 2014
I am trying to integrate the function
f1 = @(x) (1-2*x)*(exp(-i*x))
q = integral(f1,0,1)
however this throws me an error
Error using *
Inner matrix dimensions must agree.
Error in @(x,n)(1-2*x)*(exp(-i*n*x))
Error in @(x)f1(x,1)
Error in integralCalc/iterateScalarValued (line 314)
fx = FUN(t);
Error in integralCalc/vadapt (line 132)
[q,errbnd] = iterateScalarValued(u,tinterval,pathlen);
Error in integralCalc (line 75)
[q,errbnd] = vadapt(@AtoBInvTransform,interval);
Error in integral (line 88)
Q = integralCalc(fun,a,b,opstruct);
I was hopng if somebody could help me with this.
Best Regards Ishan

Respuestas (1)

Roger Wohlwend
Roger Wohlwend el 18 de Nov. de 2014
Try
f1 = @(x) (1-2*x).*(exp(-i*x))

Categorías

Más información sobre Matrix Computations en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by