Run different calculation for each value chosen from the listbox
조회 수: 1 (최근 30일)
이전 댓글 표시
Calculation script
global popVal
cg=(0.2*popVal)./(std(Bf)*6);
cgk=(0.1*popVal-sqrt(((Betaavg-Refx).*(Betaavg-Refx))))./(3*std(Bf));
MASTER{15,MASTERcount}=cg;
MASTER{16,MASTERcount}=cgk;
How do I store different values on to my handle everytime I choose an answer from my listbox?
Matlab gui
function popupmenu13_Callback(hObject, eventdata, handles)
contents = cellstr(get(hObject,'String'));
popChoice= contents(get(hObject,'Value'));
assignin('base','popChoice',popChoice)
global popVal
if (strcmp(popChoice,'Select Beta Tolerance'))
popVal=0;
elseif (strcmp(popChoice,'5°'))
popVal=5;
elseif (strcmp(popChoice,'6°'))
popVal=6;
elseif (strcmp(popChoice,'7°'))
popVal=7;
elseif (strcmp(popChoice,'8°'))
popVal=8;
elseif (strcmp(popChoice,'9°'))
popVal=9;
elseif (strcmp(popChoice,'10°'))
popVal=10;
end
assignin('base','popVal',popVal)
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Simulink Environment Customization에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!