Filter löschen
Filter löschen

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

2 Ansichten (letzte 30 Tage)
john birt
john birt am 20 Feb. 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

Akzeptierte Antwort

Paulo Silva
Paulo Silva am 20 Feb. 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 Kommentar
john birt
john birt am 20 Feb. 2011
thank you so much for your time and wisdom

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by