Question: MATLAB App Designer - please help me find what is causing me to not get a numerical value for app.Label_2.Text % Callbacks that handle component

MATLAB App Designer - please help me find what is causing me to not get a numerical value for app.Label_2.Text
 MATLAB App Designer - please help me find what is causing

\% Callbacks that handle component events methods (Access = private ) \% Button pushed function: ConvertButton function ConvertButtonPushed (app, event) usdAmount = str2double (app.AmountEditField.Value); selectedCurrency = app. CountryDropDown. Value; exchangeRate = getExchangeRate (selectedCurrency); convertedAmount = usdAmount exchangeRate; app.Label_2.Text =sprintf(%0.2f%s, convertedAmount); function rate = getExchangeRate (currency) switch currency case ' JPN ' rate =1.5 case ' CNY ' rate =5.0; case 'CAN' rate =0.9; case 'MEX' rate =2.0; otherwise rate =1.0; end end

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!