Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

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

1 visualización (últimos 30 días)
Gowrinath S
Gowrinath S el 28 de Jul. de 2019
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
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 comentario
Walter Roberson
Walter Roberson el 28 de Jul. de 2019
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];

Respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by