필터 지우기
필터 지우기

How to plot a function like this in matlab

조회 수: 1 (최근 30일)
maharaj
maharaj 2013년 2월 1일
p=0.5*(1-x^2)/((1+(x^2)-2*x*cos(t))^(3/2))
here t varies from -pi to pi x is a constant like for example 0.1

답변 (2개)

Jan
Jan 2013년 2월 1일
What about:
x = 0.1;
t = linspace(-pi, pi, 200);
p = 0.5 * (1 - x.^2) ./ ((1 + x.^2 - 2 .* x .* cos(t)).^(3/2));
plot(t, p);
Such methdos are explained exhaustively in the Getting Started chapters of the documentation and help plot offer detailed information also.

Wayne King
Wayne King 2013년 2월 1일
x = 0.1;
t = -pi:.01:pi;
p=0.5*(1-x^2)./((1+(x^2)-2*x*cos(t)).^(3/2));
plot(t,p)
I'm guessing you really mean plot p as a function of t

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by