How to plot the following equation for values of d ranging from 0 to 0.04
m=0.025, w=10, k=8*10^-9. I have obtained the following graph
The required graph is as follows
The code is as follows
function answer
%solve implicit function and plot
npoints = 40;
d = linspace(0,0.04,npoints);
x = zeros(1,npoints);
guess = 0.04;
for i = 1:npoints
x(i) = fzero(@equation,guess,[],d(i));
guess = x(i);
end
plot(d,x)
xlabel('d')
ylabel('x')
function dy = equation(x,d)
dy = 2.5*x-(2.4*10^-8*x)/((x^2+d^2)^2.5);

 採用された回答

VBBV
VBBV 2022 年 2 月 20 日
編集済み: VBBV 2022 年 2 月 20 日

0 投票

npoints = 50;
d = linspace(0,0.04,npoints);
x = zeros(1,npoints);
equation = @(x,d) 2.5*x-(2.4*10^-8*x)/((x^2+d^2)^2.5);
guess = -0.04;
for i = 1:npoints
x(i) = fzero(equation,guess,[],d(i));
guess = x(i);
end;
guess = 0.04;
for i = 1:npoints
xx(i) = fzero(equation,guess,[],d(i));
guess = xx(i);
end
plot(d,x,d,xx,'-b')
xlabel('d')
ylabel('x')
Use positive and negative values

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeNetworks についてさらに検索

質問済み:

2022 年 2 月 20 日

編集済み:

2022 年 2 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by