Effacer les filtres
Effacer les filtres

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

2 vues (au cours des 30 derniers jours)
john birt
john birt le 20 Fév 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

Réponse acceptée

Paulo Silva
Paulo Silva le 20 Fév 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 commentaire
john birt
john birt le 20 Fév 2011
thank you so much for your time and wisdom

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by