Regarding the differentiation of function

I am trying to find the d(A)/dx and plot its value for y = 1,6,0.03,0.08,10 with respect to varying x from -10 to 10.
(ii) Find the value of the maxima for all the stated y values
How to do it?
x = -10:0.1:10;
y = [1 6 0.03 0.08 10]';
A = 23 * (atan((0.005 + y)/x^2));
B = diff(A);

 採用された回答

Matt J
Matt J 2022 年 3 月 30 日

0 投票

x = -10:0.1:10;
y = [1 6 0.03 0.08 10]';
A = 23 * (atan((0.005 + y)./x.^2));
B = diff(A,1,2)/0.1;
plot(x(1:end-1),B')

4 件のコメント

Amy Topaz
Amy Topaz 2022 年 3 月 30 日
Thank you,
What is the meaning of diff(A,1,2)?
Matt J
Matt J 2022 年 3 月 30 日
It takes 1st order finite differences along dimensions number 2 (columns). See also,
Amy Topaz
Amy Topaz 2022 年 3 月 30 日
How to get the maximum values from the graph plotted for each y?
Torsten
Torsten 2022 年 3 月 30 日
By applying MATLAB's "max" to the rows of B.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange2-D and 3-D Plots についてさらに検索

タグ

質問済み:

2022 年 3 月 30 日

コメント済み:

2022 年 3 月 30 日

Community Treasure Hunt

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

Start Hunting!

Translated by