How to set domain for p(x)/q(x) functions?
2 ビュー (過去 30 日間)
古いコメントを表示
My function is x-1/x-2 how can I plot this?
0 件のコメント
回答 (2 件)
Star Strider
2018 年 9 月 23 日
Your function has a singularity at ‘x=2’. If you simply want to plot it, this works:
x = linspace(0, 4, 250);
f = @(x) (x-1)./(x-2);
figure
plot(x, f(x))
grid
0 件のコメント
Basil C.
2018 年 9 月 24 日
You could just use this simple code instead
syms x
y=(x-1)/(x-2)
ezplot(y)
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Symbolic Math Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!