필터 지우기
필터 지우기

please help me how to solve this equation in matlab?

조회 수: 2 (최근 30일)
rajasekhar reddy ogirala
rajasekhar reddy ogirala 2014년 2월 14일
댓글: Rizwana 2014년 2월 14일
i am very new to MATLAB can u please help me how to find values of R21 and X21 6 and 7 in USING MATLAB assuming i have all the values.
more importantly 1.how i can use that greek variables in MATLAB?
  댓글 수: 1
Rizwana
Rizwana 2014년 2월 14일
No you cant use any special symbol like shown in those expression in matlab.. But you can use alpha/beta and phi. To be very clear, you should know whether your values alpha and beta are in degrees/radians or its in degrees does it needs conversion to rdaians...??? I will try because evn iam learning matlab..
k =2 * pi/(lamda); % assume lamda
touw = k * H; % assume H
alpha_1 = k * (sqrt(d^2 + H^2) + H ) % assume d
alpha_2 = k * (sqrt(d^2 +( H-L)^2) + (H-L) ) % assume d and L
alpha_3 = k * (sqrt(d^2 +( H+L)^2) + (H+L) )
beta_1 = k * (sqrt(sqrt(d^2 + H^2)- H);
beta_2 = k* (sqrt(d^2+(H-L)^2)-(H-L));
beta_3 = k * (sqrt(d^2 +(H +L)^2)-(H+L));
% assume Ci and Si
p = touw ((2*Ci(alpha_1)) + (2*Ci*(beta_1)) - (Ci*(alpha_2)) - (Ci*(alpha_3)) - (Ci*(beta_2)) - (Ci*(beta_3)));
q = touw ((2*Si(alpha_1)) + (2*Si*(beta_1)) - (Si*(alpha_2)) - (Si*(alpha_3)) - (Si*(beta_2)) - (Si*(beta_3)));
r = cosd (p); % it gives cosine of values in degrees. Convert it to radians if you want your answer in radians
s = sind (q);
R21 = (efficiency/8*pi) * r * s; % efficiency is assumed
Similarly you can culate X21...
Whew you can make a function... It will be easy...
I dint ran this code. If there are some errors then check out for typing mistakes like missing parenthesis

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Characters and Strings에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by