How to set domain for p(x)/q(x) functions?
1 次查看(过去 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 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!