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!