채택된 답변

Alan Stevens
Alan Stevens 2021년 2월 27일
편집: Alan Stevens 2021년 2월 27일

1 개 추천

I assume you want to find the values of a that make the integral = 75, for all values of x. if so, then the following should do it:
x = 1:50;
aguess = 50;
for i = 1:50
a(i) = fzero(@(a) fn(a,x(i)),aguess);
aguess = a(i);
end
plot(x,a,'o'),grid
xlabel('x'),ylabel('a')
function z = fn(a,x)
f = @(x) sqrt(1+(2*a*x).^2);
z = integral(f,0,x)-75;
end
Note that the a's found from the above are positive, but the negative equivalents would also work, because a is squared in the integral.

추가 답변 (0개)

카테고리

질문:

2021년 2월 27일

댓글:

2021년 2월 27일

Community Treasure Hunt

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

Start Hunting!

Translated by