How can I use a vector inside integral?

23 Ansichten (letzte 30 Tage)
eric rocha
eric rocha am 20 Nov. 2018
Beantwortet: madhan ravi am 20 Nov. 2018
%I am tring to make a fit where the xdata are inside of a integral
%but this is not allowed
clear all
load C:\Users\Aluno\Desktop\rafael\novo\B100.txt
xdata = B100_(:,1);
ydata = B100_(:,2);
fun = @(x,xdata) x(1) + x(2).*integral( @(V) 2.*cosh(V*xdata) , 0 , 2);
x0 = [ 1, 1.2];
output = lsqcurvefit(fun,x0,xdata,ydata)

Akzeptierte Antwort

madhan ravi
madhan ravi am 20 Nov. 2018
Use integral() with arrayvalued method as suggested in the link

Weitere Antworten (0)

Kategorien

Mehr zu Interpolation 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