how can ı use find code in graph

7 ビュー (過去 30 日間)
Mert Inceoglu
Mert Inceoglu 2019 年 12 月 12 日
コメント済み: darova 2019 年 12 月 13 日
f='(x-1)^2*(x-2)*(x-3)';
g='2*(x-1)*(x-2)*(x-3)+(x-1)^2*(x-3)+(x-1)^2*(x-2)';
xx=0:0.01:3.5;
for z=1:length(xx)
ff(z)=feval(inline(f),xx(z));
gg(z)=feval(inline(g),xx(z));
end
a=10^(-10);
figure(1)
plot(xx,ff,'k','linewidth',2);
hold on
plot(xx,gg,'k-.','linewidth',2)
legend('f(x)','g(x)')
axis([min(xx) max(xx) -2 2])
xlabel('x')
plot(z(find(abs(gg)<a),ff(find(abs(gg)<a),'ro','ro'));
ı want to find min and max point in functionı wanna online sketch that figure
  1 件のコメント
darova
darova 2019 年 12 月 13 日
What about peaks function?

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating, Deleting, and Querying Graphics Objects についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by