Multiple conditions for calculation answer
Show older comments
Hi, I am new to MATLab App Designer. I'm trying to do a settlement foundation calculator but based on multiple conditions. First, user can choose either in SI unit or Conventional Unit, then they have to choose the foundation width in the radio button group since there are various formula based on its width. I have attached my code for your reference. Thank you in advanced!
% Button pushed function: CalculateButton_3
function CalculateButton_3Pushed(app, event)
depthfactor = app.DepthFactorDfEditField_3.Value;
bearingprs = app.NetBearingPressureqEditField.Value;
n60 = app.StandardPenetrationTestN60EditField.Value;
B = app.FoundationWidthBEditField.Value;
if app.ConventionalButton.Value && app.Button_2
Se= (2.5*bearingprs)/(n60*depthfactor);
app.SettlementSeEditField.Value= Se;
else app.ConventionalButton.Value && app.Button
Se= (4*bearingprs)/(n60*depthfactor);
app.SettlementSeEditField.Value= Se;
end
1 Comment
Voss
on 3 Dec 2022
What are app.Button and app.Button_2?
Are you sure that else shouldn't be elseif?
What's your question for us?
Answers (0)
Categories
Find more on Develop Apps Using App Designer in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!