How can I use a vector inside integral?

조회 수: 18 (최근 30일)
eric rocha
eric rocha 2018년 11월 20일
답변: madhan ravi 2018년 11월 20일
%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)

채택된 답변

madhan ravi
madhan ravi 2018년 11월 20일
Use integral() with arrayvalued method as suggested in the link

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Interpolation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by