Borrar filtros
Borrar filtros

how to plot y = m*x+d*g+d*​(g^(1/k)+b​^2+(b-x)^2​)^k;

2 visualizaciones (últimos 30 días)
john birt
john birt el 20 de Feb. de 2011
A very basic question but I cannot seem to find any such easy plot examples online. I wish to plot
y = m*x+d*g+d*(g^(1/k)+b^2+(b-x)^2)^k
like plot(x,y), the following does not work
t = 0:.1:20; m=0.1; d=0.1; g=0.1; b=0.1; k=0.3; y = m*t+d*g+d*(g^(1/k)+b^2+(b-t)^2)^k; ezplot(t,y)
please help a hopeless matlab coder (i.e me!)
thanks

Respuesta aceptada

Paulo Silva
Paulo Silva el 20 de Feb. de 2011
x = 0:.1:20;
m=0.1;
d=0.1;
g=0.1;
b=0.1;
k=0.3;
y = m*x+d*g+d*(g^(1/k)+b^2+(b-x).^2).^k;
plot(x,y)
Another way to do it:
x = 0:.1:20;
m=0.1;
d=0.1;
g=0.1;
b=0.1;
k=0.3;
y =@(x) m*x+d*g+d*(g^(1/k)+b^2+(b-x).^2).^k;
ezplot(y)
  1 comentario
john birt
john birt el 20 de Feb. de 2011
thank you so much for your time and wisdom

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by