필터 지우기
필터 지우기

Plotting Math function

조회 수: 2 (최근 30일)
Dyno
Dyno 2012년 2월 4일
Trying to visualize the surface of following function:
func = (2^(-2*((x.-.1)/.9)*2))*((sin(5*pi*.x))^6); where x can take value from [0,1].
Any help on how to plot the surface....thank you for your kind help

답변 (1개)

the cyclist
the cyclist 2012년 2월 4일
I had to make some guesses at corrections to your function, which was not specified correctly. (For example, I was not sure what "x.-.1" meant.) But the following code will execute and make a plot, so maybe that will help you fix anything I did wrong:
x = 0:0.01:1;
func = @(x)(2.^(-2*((x-0.1)/0.9)*2)).*((sin(5*pi*x)).^6);
plot(x,func(x))
  댓글 수: 2
Dyno
Dyno 2012년 2월 27일
hello sir...quite a bit late to say thanks.....but this worked....Thanks a lot!!
the cyclist
the cyclist 2012년 2월 27일
You're welcome. You might consider accepting the answer, to help future users looking for similar solutions.

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

Community Treasure Hunt

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

Start Hunting!

Translated by