Undefined variable "handles" or class "handles.ik5".

set (handles.ik5,'string',ik5);
Unable to resolve the name 'handles.ik5'.
set (handles.es5,'string',es5);
set (handles.el5,'string',el5);
set (handles.ik7,'string',ik7);
set (handles.es7,'string',es7);
set (handles.el7,'string',el7);
set (handles.pk,'string',pk);
set (handles.ep,'string',ep);
set (handles.em,'string',em);
set (handles.rg,'string',rg);
set (handles.els,'string',els);
pg=handles.pg;
lg=handles.lg;
smk=handles.smk;
sktm=handles.sktm;
ttm=handles.ttm;
dr=handles.dr;
wg=handles.wg;
agm=handles.agm;
rt=handles.rt;
rp=handles.rp;
ts=handles.ts;
rup=handles.rup;
run=handles.run;
jup=handles.jup;
jun=handles.jun;
pr=handles.pr;
dk=handles.dk;
jr=handles.jr;
ksp=handles.ksp;
ksl=handles.ksl;
kp=handles.kp;
rh=handles.rh;
ik5 = (0.116)/(sqrt(wg));
es5 = ik5*(ttm+(1.5*rp));
el5 = ik5*(ttm+(6*rp));
ik7 = (0.157)/(sqrt(wg));
es7 = ik7*(ttm+(1.5*rp));
el7 = ik7*(ttm+(6*rp));
pk = (pg*ksp)+(lg*ksl)+(pr*jr);
ep = agm*rh;
na = (2*pk)/((pg*ksp)+(lg*ksl));
nb = (sqrt((pg*ksp)+(lg*ksl))/(4*sqrt(pg*lg)));
n = na*nb*1*1;
ki = 0.644+(0.148*n);
jsp = (pg)/(ksl-l);
kh = sqrt(l+kp);
km = (1/(2*3.14159))*(((log((jsp*jsp)/(16*kp*dk)))+(((jsp+2*kp)^2)/(8*n*dk))-((dk)/4*dk))+(1/kh)*(log(8/(3.14159*(2*n-1)))));
em = km*ki*rt*(agm/pk);
rg = rt*((l/pk)+(1/aqrt(20*(pg*lg)))*(1+(1/(1+kp*aqrt(20/(pg*lg))))));
ks = 1/3.14159*((1/(2*kp))+(1/(jsp+kp))+(1/jsp)+(1-0.5^(n-2)));
els = ks*ki*rt;

답변 (1개)

Steven Lord
Steven Lord 2023년 11월 15일

0 개 추천

Did you try to copy this code out of an app and run it in the Command Window? That's not going to work. Generally a handles structure is created and maintained by an app (most often one created with GUIDE, but it could also have been created programmatically) and if you try to run that code without the corresponding app, MATLAB don't know where to find the data the code asks for.

댓글 수: 1

I searched online but I could not find any matching code. It must have been provided to them by someone.

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

카테고리

도움말 센터File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

제품

질문:

2023년 11월 15일

댓글:

2023년 11월 15일

Community Treasure Hunt

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

Start Hunting!

Translated by