필터 지우기
필터 지우기

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

조회 수: 2 (최근 30일)
john birt
john birt 2011년 2월 20일
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

채택된 답변

Paulo Silva
Paulo Silva 2011년 2월 20일
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
john birt
john birt 2011년 2월 20일
thank you so much for your time and wisdom

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by