필터 지우기
필터 지우기

How do you substitute x(1),x(2),x(3) in place of kp,ki and l respectively?

조회 수: 1 (최근 30일)
Neelanjan Pal
Neelanjan Pal 2020년 4월 22일
편집: VBBV 2021년 9월 5일
y=((1/10^(l + 1)*ki*kp*l*sin((pi*l)/2))/(kp + (ki*kp*cos((pi*l)/2))/10^l) - (1/10^(l + 1)*ki^2*kp^2*l*cos((pi*l)/2)*sin((pi*l)/2))/(10^l*(kp + (ki*kp*cos((l*pi)/2))/10^l)^2))/((1/10^(2*l)*ki^2*kp^2*sin((pi*l)/2)^2)/(kp + (ki*kp*cos((l*pi)/2))/10^l)^2 + 1) - (1/(25*((2^(1/2)*10^(1/2))/5 + 1)^2) - (2^(1/2)*10^(1/2))/(100*((2^(1/2)*10^(1/2))/5 + 1)))/(4/(5*((2^(1/2)*10^(1/2))/5 + 1)^2) + 1)
How do you substitute x(1),x(2),x(3) in place of kp,ki and l respectively so that i can convert it into a function in x: @x y ?

답변 (2개)

James Tursa
James Tursa 2020년 4월 22일
편집: James Tursa 2020년 4월 22일
To keep your equation the same, e.g.,
y1 = @(kp,ki,l) ((1/10^(l + 1)*ki*kp*l*sin((pi*l)/2))/(kp + (ki*kp*cos((pi*l)/2))/10^l) - (1/10^(l + 1)*ki^2*kp^2*l*cos((pi*l)/2)*sin((pi*l)/2))/(10^l*(kp + (ki*kp*cos((l*pi)/2))/10^l)^2))/((1/10^(2*l)*ki^2*kp^2*sin((pi*l)/2)^2)/(kp + (ki*kp*cos((l*pi)/2))/10^l)^2 + 1) - (1/(25*((2^(1/2)*10^(1/2))/5 + 1)^2) - (2^(1/2)*10^(1/2))/(100*((2^(1/2)*10^(1/2))/5 + 1)))/(4/(5*((2^(1/2)*10^(1/2))/5 + 1)^2) + 1);
y = @(x) y1(x(1),x(2),x(3));
  댓글 수: 1
Neelanjan Pal
Neelanjan Pal 2020년 4월 25일
y =
function_handle with value:
@(x)y1(x(1),x(2),x(3))
Only this is showing and nothing else.

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


VBBV
VBBV 2021년 9월 5일
편집: VBBV 2021년 9월 5일
syms kp ki l
y= ((1/10^(l + 1)*ki*kp*l*sin((pi*l)/2))/(kp + (ki*kp*cos((pi*l)/2))/10^l) - (1/10^(l + 1)*ki^2*kp^2*l*cos((pi*l)/2)*sin((pi*l)/2))/(10^l*(kp + (ki*kp*cos((l*pi)/2))/10^l)^2))/((1/10^(2*l)*ki^2*kp^2*sin((pi*l)/2)^2)/(kp + (ki*kp*cos((l*pi)/2))/10^l)^2 + 1) - (1/(25*((2^(1/2)*10^(1/2))/5 + 1)^2) - (2^(1/2)*10^(1/2))/(100*((2^(1/2)*10^(1/2))/5 + 1)))/(4/(5*((2^(1/2)*10^(1/2))/5 + 1)^2) + 1);
yy = subs(y,[kp ki l],[x(1) x(2) x(3)])

카테고리

Help CenterFile Exchange에서 Numbers and Precision에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by