How to use intervals within fplot?

조회 수: 28 (최근 30일)
John Doe
John Doe 2014년 2월 22일
답변: Christopher Creutzig 2016년 10월 25일
So i have an matlab .m function file called f.m, which is a function f(x).
I can use the code below to plot the graph within for x=10-20
clear; clc
fplot(@f, [10 20])
is there a way to do this so I can make it more accurate too? so use an interval, for instance, 10:0.01:20?
I've tried
clear; clc
fplot(@f, [10:0.01:20])
but it won't run.
Anyone know how to do this? thanks.

답변 (1개)

Christopher Creutzig
Christopher Creutzig 2016년 10월 25일
In R2016a and beyond, you could use this:
fplot(@f,[10,20],'MeshDensity',100)
It's worth noting that fplot in these releases tries to automatically refine the plot density where needed, anyway.

카테고리

Help CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by