フィルターのクリア

fplot fails to produce a graph

2 ビュー (過去 30 日間)
Henning Søgaard
Henning Søgaard 2016 年 9 月 22 日
コメント済み: Karan Gill 2016 年 10 月 25 日
The first fplot in the following code doesn't produce a graph (only a coordinate system) while the second fplot does. Why? (MATLAB R2016a; Windows 7 Enterprise)
r = 50; L = 110; h = 40;
th = @(t) 80*(t+exp(-t)-1);
y = @(t) r*sin(th(t)) + sqrt(L^2-(r*cos(th(t))).^2) + h;
f = @(t) y(t) - 195;
fplot(y,[0 2])
figure
fplot(f,[0 2])
  9 件のコメント
Walter Roberson
Walter Roberson 2016 年 10 月 23 日
I just tested in R2016b on OS-X, and in R2016b on Windows 10, and the fplot does work now.
Karan Gill
Karan Gill 2016 年 10 月 25 日
A public bug report exists: http://www.mathworks.com/support/bugreports/1383817. As a workaround, it states: "You might be able to work around this behavior by tweaking the x-axis range. For example, try fplot(@f,[2 3.1]) instead of fplot(@f,[2 3]). Otherwise, set the axis range using the axis function, for example, axis([0 2 -5 5]) (i.e., [xmin xmax ymin ymax])."

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

回答 (1 件)

Mudambi Srivatsa
Mudambi Srivatsa 2016 年 9 月 26 日
This is a bug in MATLAB R2016a and it is resolved in MATLAB R2016b. You can upgrade to R2016b to resolve the issue or use "ezplot" as a workaround in R2016a.

カテゴリ

Help Center および File ExchangeCalculus についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by