フィルターのクリア

I am having trouble reading textfile data into my app using uigetfile and readtable functions in appdesigner. Kindly assist

2 ビュー (過去 30 日間)
I am using a pushbutton.userdata option to read the textfiles and i am not sure if thats the right way to do it. Once the data is read in the dialogbox app. it should be passeed to the main app to complete calculations using ode45 integration.
[The data provided is daily for 365days, kindly run the model from the 1st,JAN,2023 to 31st,DEC,2023] i.e choose the start date as January, 1st, 2023 and end date as December, 31st, 2023 under the simulation tab.
I am encountering the following errors when i push the Runmodel button under the simulation tab.
Error while evaluating Button PrivateButtonPushedFcn.
Warning: Failure at t=4.400000e+01. Unable to meet integration tolerances without reducing the step size below the smallest value
allowed (1.136868e-13) at time t.
> In ode45 (line 662)
In IAA_1/RunModelButtonPushed (line 249)
In matlab.apps.AppBase>@(source,event)executeCallback(ams,app,callback,requiresEventData,event) (line 62)
Attched are the apps and the CWR data (CWR.txt), Rainfalldata(PCP.txt), Wind_data(WND.txt), Humidity_data(HMD.txt), Temperature_data(TMP.txt), Daylighthours(DLH.txt)
Moreover, when i try to write the data i have read, there seems to be mixup. Like CRW data contains TMP data and vice versa. Kindly assist.

採用された回答

Voss
Voss 2024 年 4 月 14 日
All of the IAA_1 app's properties that are passed to the second app (T_wout, T_win, Sr, etc.) are initially empty [].
You can either initialize them to non-empty values, e.g., in IAA_1, where they are defined as app properties:
properties (Access = private)
Dialogapp1
T_wout = 27
T_win = 27
Sr = 2
% etc.
Or you can check whether they're empty in the startupFcn of WATER_TMP_Dialogbox_1, and only update the components corresponding to non-empty values:
if ~isempty(T_wout)
app.T_woutEditField.Value=T_wout;
end
if ~isempty(T_win)
app.T_winEditField.Value=T_win;
end
if ~isempty(Sr)
app.srEditField.Value = Sr;
end
% etc.
Or you can do both of those things.
  2 件のコメント
Daniel
Daniel 2024 年 4 月 15 日
移動済み: Voss 2024 年 4 月 16 日
Thank you so much for your response. How about the 'Warning: Failure at t=4.400000e+01. Unable to meet integration tolerances without reducing the step size below the smallest value
allowed (1.136868e-13) at time t.
> In ode45 (line 662)'
Voss
Voss 2024 年 4 月 16 日
You're welcome!
Not sure about that warning.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

製品


リリース

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by