フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

regarding the output graph, pls help me to correct my input..

1 回表示 (過去 30 日間)
Gowrinath S
Gowrinath S 2019 年 7 月 28 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
syms x y
f=input('x.^2');
x0=input('2');
y0=subs(f,x,x0);
fx=diff(f,x);
m=subs(fx,x,x0);
tangent=y0+m*(x-x0);
plotrange=[x0-3+x0-3];
ezplot(f,plotrange);
hold on;
ezplot(tangent,plotrange);
title('ploting of tangents')
t=sprintf('the tan to the curve y= %s at the point (%d,%d)is y= %s,f,x0,y0,tangent');
disp(t)
  1 件のコメント
Walter Roberson
Walter Roberson 2019 年 7 月 28 日
plotrange=[x0-3+x0-3];
That is going to return a scalar, but ezplot() requires that it be passed a vector of two values. Perhaps you want
plotrange = [x0-3, x0+3];

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by