how can i solve this problem and plotting?
2 ビュー (過去 30 日間)
古いコメントを表示
x=1:1:50;
plot x,a grap?
0 件のコメント
採用された回答
Alan Stevens
2021 年 2 月 27 日
編集済み: Alan Stevens
2021 年 2 月 27 日
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 件)
参考
カテゴリ
Help Center および File Exchange で Numerical Integration and Differential Equations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!