how to do this

조회 수: 11 (최근 30일)
agil
agil 2014년 10월 21일
답변: Shrirang 2014년 10월 21일
y=6[2A-0.5sin(A)]/pi for 0<= x <= pi/2

답변 (2개)

Mischa Kim
Mischa Kim 2014년 10월 21일
편집: Mischa Kim 2014년 10월 21일
Agil, what is A? Is it supposed to be x? At any rate, in MATLAB language you'd use something like
x = 0:0.1:pi/2; % crates a vector of x vals
y = 6*(2*x - 0.5*sin(x))/pi % computes y as a function of x
plot(x,y)

Shrirang
Shrirang 2014년 10월 21일
Yes above answer is right but If you are looking for system implementation then u can implement in simulink as in diagram or in m script you can write as follows (same as above answer but some changes) if (x>=0) && (x<=pi/2) y = 6*(2*x - 0.5*sin(x))/pi; else y = 0; % Depends on your requirement end

카테고리

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